Linting standards: Bitwise operators
antranig.basman at colorado.edu
Sun Apr 6 11:20:14 EDT 2014
Checking with the community about a jshint option that came up in the
channel on Friday - do we agree that the prohibition against the bitwise
operators (which I believe was simply inherited into jshint from the
Crockford days) is irrational?
Their annotation simply reads
"This option prohibits the use of bitwise operators such as ^ (XOR), |
and quite often & is simply a mistyped &&."
IMO just because they are "rare" doesn't mean that they are not to be
recommended - also the XOR operator seems indispensable without which we
would write monstrosities such as if (!!a !== !!b).
Are we ok to just turn off this option in our linting?
More information about the fluid-work