Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does JSLint improve your Javascript coding? [closed]

Douglas Crockford says:

JavaScript is a sloppy language, but inside it there is an elegant, better language. JSLint helps you to program in that better language and to avoid most of the slop.

Do those programmers who use JSLint on a regular basis have the same opinion?

like image 262
timbo Avatar asked Aug 22 '09 20:08

timbo


2 Answers

Some say it's too strict. I disagree--you control which offenses it complains about. If it hurts your feelings too much, tone down its warnings.

like image 182
Nosredna Avatar answered Oct 12 '22 23:10

Nosredna


I don't use it on any kind of daily basis right now ; it's a bit "too strict" for my taste.

But I've used it for some time in the past, and, considering what it said as "advices", it has probably helped me improve my JS coding style.

Actually, reading some coding-recommandations in JS can be a good thing, even if not using JSLint on a daily basis.
Taking a look at the documentation of JSLint, for instance, can help, giving you ideas of "If some like Douglas Crockford thinks this stuff is bad, maybe it really is" -- just don't forget that you have the right to think by yourself too ;-)
Watching some videos on the YUI Theater is nice too, btw : there are some that are really useful (Including some of Douglas Crockford).

Now, my code is not 100% jslint-correct ; but I certainly have less "bad-coding stuff" than I had before.


And, sometimes, when there is a bug in some piece of code, using JSLint on it can help identify it ;-)

like image 26
Pascal MARTIN Avatar answered Oct 13 '22 00:10

Pascal MARTIN