3 ms·
I much prefer JSHint. JSLint is draconian, and has some borderline insane decisions (it complains if you don't declare your vars at the top of a block—is this 1
by beaumartinez 15y ago
I much prefer JSHint. JSLint is draconian, and has some borderline insane decisions (it complains if you don't declare your vars at the top of a block—is this 1980?).
And yes, I realise that some of these options can be turned off—but JSHint has better defaults.
- mudetroit 15y agoThere is a reason for the insanity you are complaining about. The vars are effectively hoisted there by the interpreter anyway, by pulling them to the top of the block you remove a possible point of confusion, and more importantly a possible point of bugs.
- bronson 15y agojshint is great. Putting this in ~/.jshintrc makes it a lot more sane: { "browser" : true, "node" : true, "undef" : true, "eqeqeq" : true, "noarg" : true }