solidcodes — 2013-06-23T19:44:35-04:00 — #1
Which is better and why?
Thanks in advance.
felgall — 2013-06-23T22:21:15-04:00 — #2
jshint.com appears to be an open source copy of jslint.com
solidcodes — 2013-06-23T22:47:55-04:00 — #3
So in conclusion jshint is much better.
jeff_mott — 2013-06-23T22:49:01-04:00 — #4
More specifically, jslint was created by Doug Crockford, and although he's very smart and knowledgeable, he's also very dogmatic, and that's reflected in jslint, which has several of Crockford's coding rules baked into the linter. jshint is a fork of jslint, but made to be more configurable. These days, I think jshint is the better tool.
felgall — 2013-06-24T18:32:55-04:00 — #5
Those particular rules are there because of the errors that sometimes occur if you don't apply those rules.
Douglas Crockford has been known to modify the script to build in additional rules once it is made clear to him that without the rule that the code is error prone.
In other words he's dogmatic for good reasons and being able to turn off rules where jslint doesn't provide an option for doing so is not necessarily a good thing.
pullo — 2013-06-25T02:59:27-04:00 — #6
Here's a little bit more on why Anton Kovalyov forked JSLint to JSHint: http://anton.kovalyov.net/2011/02/20/why-i-forked-jslint-to-jshint/
It seems to me that JSLint is generally a little more lenient (or at least configurable or agnostic) on a few stylistic and minor syntactical "opinions" that JSLint (i.e. Mr Crockford) is a stickler on.
aussiejohn — 2013-06-25T05:16:37-04:00 — #7
JSHint is my preferred linter because of its configurability and tendency to be a little more lenient. In general the things I tell it to be lenient about are not things that would break anything if they were not adhered to (such as indentation/whitespace rules, type of quotes used, etc.)