JSHint: An Community Driven Fork of JSLint
badassjs.com
JSHint: An Community Driven Fork of JSLint
1–10 of 30 posts
Re: JSHint: An Community Driven Fork of JSLint
#2Given that, I do agree that JSLint is sometimes more strict but you can change the flags to ignore those warnings if you'd like.
Re: JSHint: An Community Driven Fork of JSLint
#3The snarky comment seems unnecessary, "The most important difference is that JSHint is developed and supported by the JavaScript developer community and not by one very opinionated person". Douglas Crockford did a lot of great things for the JavaScript community. Considering they had just forked this, I'm not sure how they can immediately claim that theirs is supported by the JavaScript community, while JSLint is sup…
However, 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 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.
Re: JSHint: An Community Driven Fork of JSLint
#4The snarky comment seems unnecessary, "The most important difference is that JSHint is developed and supported by the JavaScript developer community and not by one very opinionated person". Douglas Crockford did a lot of great things for the JavaScript community. Considering they had just forked this, I'm not sure how they can immediately claim that theirs is supported by the JavaScript community, while JSLint is sup…
Crock's contributions are massive, I agree. I'm so glad that we've had a JSLint in the first place. However, 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 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 cust…
Re: JSHint: An Community Driven Fork of JSLint
#5Earlier quoted context omitted.
Crock's contributions are massive, I agree. I'm so glad that we've had a JSLint in the first place. However, 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 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 cust…
Is there any reference for the reasoning behind error-ing on the standard for loop?
Problem at line 1 character 6: Move 'var' declarations to the top of the function.
I do prefer having all my vars at the top of the function, loop vars are an exception though.Re: JSHint: An Community Driven Fork of JSLint
#6Earlier quoted context omitted.
Crock's contributions are massive, I agree. I'm so glad that we've had a JSLint in the first place. However, 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 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 cust…
Is there any reference for the reasoning behind error-ing on the standard for loop?
Re: JSHint: An Community Driven Fork of JSLint
#7I'm guessing Crockford's code is extremely pristine, or that he's never used anyone else's code before.
I challenge anyone to run jslint over one of the many jquery libraries out there. I guarantee that there will be more than 100 errors per library, which is completely useless for debugging with all that noise.
Re: JSHint: An Community Driven Fork of JSLint
#8Earlier quoted context omitted.
Is there any reference for the reasoning behind error-ing on the standard for loop?
Problem at line 1 character 6: Move 'var' declarations to the top of the function. I do prefer having all my vars at the top of the function, loop vars are an exception though.
Declaration of variables in the loop could lead to this type of error:
http://cam.ly/blog/2011/01/javascript-interview-question/
(All of the 4 will do alert('4') when clicked, when the programmer expects alert('1'), alert('2'), etc.)
If the variable had been declared at the top, that error probably would not happen.
Re: JSHint: An Community Driven Fork of JSLint
#9Earlier quoted context omitted.
Problem at line 1 character 6: Move 'var' declarations to the top of the function. I do prefer having all my vars at the top of the function, loop vars are an exception though.
I think Crockford is right about that error. Declaration of variables in the loop could lead to this type of error: http://cam.ly/blog/2011/01/javascript-interview-question/ (All of the 4 will do alert('4') when clicked, when the programmer expects alert('1'), alert('2'), etc.) If the variable had been declared at the top, that error probably would not happen.
addEventListener("stuff", function() {
return function(index) {
alert(index);
}
}(i);
is the fix, either wayRe: JSHint: An Community Driven Fork of JSLint
#10However, the license still contains the following clause:
"The Software shall be used for Good, not Evil."
So it is not using an OSI approved license, and a such I would not consider it open source. That clause adds a restriction on how you can use the software, and a very vague restriction too. Be wary if you intend to include this in an existing project.