Why are bitwise operators not allowed in tslint?

Mick picture Mick · Dec 3, 2017 · Viewed 21k times · Source

We can't use bitwise operators in templates, but why are they not allowed by tslint within TypeScript code?

"no-bitwise": true,

Answer

Grant Eagon picture Grant Eagon · Apr 3, 2018

Bitwise operators are often typos - for example bool1 & bool2 instead of bool1 && bool2. They also can be an indicator of overly clever code which decreases maintainability.

https://palantir.github.io/tslint/rules/no-bitwise/