Hacker News new | past | comments | ask | show | jobs | submit login

Related question... what do you do when the execution of your script just aborts without an error?

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?!?




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




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: