3 ms·
I think JSLint should probably get a mention when discussing best practices. It can be rather picky but most options have toggles. (I'm particularly not fond
by grannyg00se 15y ago
I think JSLint should probably get a mention when discussing best practices. It can be rather picky but most options have toggles. (I'm particularly not fond of having to put extra spaces around operators. var j=2 looks better to me than var j = 2)
- googletron 15y agoyeah thats more syntax issue. alot of the time when I hate reading javascript, when it has no structure to it.
- marcins 15y agoThere's also JSHint (http://www.jshint.com/ http://www.jshint.com/), a fork of JSLint with a bit more configurability.
- dave1010uk 15y agoIt's well worth the effort writing code that conforms to JSLint or JSHint. There are a few rules which seem excessive but if you code in a team then it's so much easier knowing that all code follows a standard. When another programmer asks me to fix bugs in some code, I get them to make it parse JSHint first. Most of the time, fixing errors to make it conform either fixes the bug or helps them understand the code enough to fix it themselves.