Re:Ask HN: JavaScript Dev Tools
by twirlthestash on Saturday February 04, 2012 @02:39PM
(#3551841)
Try Closure Compiler instead of JSLint. It will catch your syntax errors without being so opinionated.
If you don't need Closure's minified output, don't use it; the error messages are still nice.
If you don't want to drop Closure into your app's JS build chain, use a Makefile for quick syntax checks: http://pastebin.com/raw.php?i=cqX165iD
This happens sometimes to me, especially when I bundle all my JS resources together into one file. JSLint doesn't help, as some 3rd party libraries don't pass JSLint tests.
What I end up doing is adding console.log/alert statements all the way through the scripts to narrow down where the script aborts. There must be a better way?!?