3 ms·
The problem is that JSLint goes further than static analysis and suggests what could be considered simply "stylistic" changes to match the way Crockford thinks
by bcrescimanno 15y ago
The problem is that JSLint goes further than static analysis and suggests what could be considered simply "stylistic" changes to match the way Crockford thinks javascript should be written.
For example, doing comparisons (x == null) or (x != null) is a well known shortcut for checking vs null or undefined. There's nothing inherently "bad" about using that shortcut.
- lazerwalker 15y agoIt sounds to me like what you need isn't an escape from JSLint, but rather a better JSLint config file that skips the stylistic checks you dislike. JSLint at its strictest can definitely be a little too strict. (of course, there's really no reason to be using JSLint over JSHint anyway)
- bcrescimanno 15y agoWell that was actually my point; JSHint is effectively a highly configurable version of JSLint.
- masklinn 15y agoJSLint is already a highly configurable version of JSLint. JSHint is a leniently configured JSLint.