Skip to content

eslint/no-bitwise Restriction

What it does

Disallow bitwise operators

Why is this bad?

The use of bitwise operators in JavaScript is very rare and often & or | is simply a mistyped && or ||, which will lead to unexpected behavior.

Example

javascript
var x = y | z;

References

Released under the MIT License.