4 ms·
Even better is setting your editor to run JSHint when you save a .js file, and let you know if there are problems. Not only does it avoid stupid bugs, it saves
by apike 15y ago
Even better is setting your editor to run JSHint when you save a .js file, and let you know if there are problems. Not only does it avoid stupid bugs, it saves time round-tripping to the browser for trivial issues like syntax errors.
- almost 15y agoSounds like a good idea. I know emacs flymake mode can be set up to underline problems detected by jshint. Personally I like to have the tests and jshint run by a hotkey so I can happily move the code through invalid states (towards a valid goal) without being constantly complained at :)
- daleharvey 15y agoI wrote a jshint mode for emacs https://github.com/daleharvey/jshint-mode https://github.com/daleharvey/jshint-mode
- wahnfrieden 15y agoI use jshint in vim as well: https://github.com/wookiehangover/jshint.vim https://github.com/wookiehangover/jshint.vim
- eric-hu 15y agodoes this work for coffeescript as well?
- philjackson 15y agoUnless you use backticks, coffee will always pass jslint tests.
- vinnycoyne 15y agoNever heard of JSHint. Thanks for the tip!