May 2008
Intermediate to advanced
172 pages
4h 54m
English
As a further defense against the masking of errors by the semicolon insertion mechanism, JSLint expects long statements to be broken only after one of these punctuation characters or operators:
, ; : { } ( [ = < > ? ! + - * / % ˜ ^ | &
== != <= >= += -= *= /= %= ^= |= &= << >> || &&
=== !== <<= >>= >>> >>>=JSLint does not expect to see a long statement broken after an identifier, a string, a number, a closer, or a suffix operator:
) ] . ++ −−
JSLint allows you to turn on the "Tolerate sloppy line breaking" (laxbreak) option.
Semicolon insertion can mask copy/paste errors. If you always break lines after operators, then JSLint can do a better job of finding those errors.