43

Anyone know what JSLint's 'Tolerate Stupidity' option is all about? What family of warnings does it disable?

I've found some reference to Node.js and "Sync" methods (including Crockford's comment that "it is very well named") but no clear answer.

thanks.

biril
  • 1,975
  • 1
  • 19
  • 30

1 Answers1

49

According to the documentation, it does this:

true if blocking ('...Sync') methods can be used.

Evidently Node Sync methods are blocking, and Crockford hates blocking operations in JS.

Note: There's a lot of stuff JSLint is picky about that may be more a matter of taste than a matter of code quality. Crockford is known to be rather opinionated about certain conventions and doesn't distinguish these in JSLint from actually harmful code. That's why there's tools like JSHint which tend to be more forgiving of these matters of taste.

eyelidlessness
  • 62,413
  • 11
  • 90
  • 94
  • 2
    +1 for pointing me to the documentation. (The "Read the instructions" link at the top of the JSLint page is too easy to miss apparently...) – biril Apr 29 '12 at 20:36
  • @biril, I found it through Google, I find Crockford's own pages frustrating to navigate as it is. – eyelidlessness Apr 29 '12 at 20:44
  • @Raynos, I wouldn't really know (I haven't had the opportunity to do anything particularly interesting yet with Node), but it's still worth noting that Crockford treats his preferences as an indication of quality in a number of cases. – eyelidlessness Apr 29 '12 at 20:45
  • 5
    It isn't a preference it is quality. `...Sync` is just as stupid as `with`. Zero good usecase, huge performance penalties – Raynos Apr 29 '12 at 23:40
  • 13
    @Raynos, **I wouldn't really know** *(I haven't had the opportunity to do anything particularly interesting yet with Node)*, but it's still worth noting that Crockford treats his preferences as an indication of quality **in a number of cases**. – eyelidlessness Apr 30 '12 at 05:43
  • 1
    Synchornous code is necessary (or really handy) for some things and for proof that non-stupid people uses it, search for it on node.js source – gcb Nov 16 '12 at 23:40
  • 1
    And if you want proof that `with` is used by intelligent people, check out [this answer](http://stackoverflow.com/a/3976785/2093695), which shows a legitimate use for `with` in the firebug source itself! – Brian McCutchon Aug 16 '13 at 03:49