Paul Irish and Anton Kovalyov have launched an online tool for checking your JavaScript code for errors and problems. JSHint aims to be more flexible and support more environments than JSLint, a similar tool created by Douglas Crockford.
Regarding the difference between JSHint and JSLint the JSHint website says “The most important difference is that JSHint is developed and supported by the JavaScript developer community and not by one very opinionated person.”
Irish elaborates on the differences in a comment on Hacker News:
JSLint has gotten increasingly more opinionated in the past few months.. For example, the standard for loop:
`for (var i = 0, len = arr.length; i < len; i++) { ... `
will now error out in JSLint.A lot of these sorts of changes don't have flags to customize, so that's something that JSHint aims to fix. Start with some great defaults, and allow them to be customized. Heck, we even save your checkbox preferences for you (via localStorage).
Crock's responses to people asking for changes on the mailing list have also been a little disappointing:
"Your sadly pathetic bleatings are harshing my mellow." http://tech.groups.yahoo.com/group/jslint_com/message/1688
On the github project, he's refused CommonJS convention, NodeJS export support, and Rhino compat -- all quite easy to do. So until Crock's primary JSLint is a bit more friendly to customizability and different environments, JSHint will fulfill those needs.
0 Responses
Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.