# no-bitwise

Rule `eslint/no-bitwise`. Disallow bitwise operators

- Source: eslint
- Technologies: JavaScript
- Kind: suspicious
- Needs type information: no
- Autofix: no
- Reach: 13.6M weekly downloads of presets that enable it
- Trend: +12.3% last quarter
- Rank: #712 by reach, #1451 by growth

## Linters

| Linter | Rule name | Recommended | Autofix | Details | Docs |
| --- | --- | --- | --- | --- | --- |
| ESLint | `no-bitwise` | no | no | package `eslint` | [docs](https://eslint.org/docs/latest/rules/no-bitwise) |
| Oxlint | `no-bitwise` | no | no | plugin `eslint`, category restriction | [docs](https://oxc.rs/docs/guide/usage/linter/rules/eslint/no-bitwise.html) |
| Biome | `suspicious/noBitwiseOperators` | no | no | group suspicious, since 2.0.0 | [docs](https://biomejs.dev/linter/rules/no-bitwise-operators/) |

## Code examples

### Incorrect: the rule reports this

```js
let x = y | z;

const x1 = y & z;

const x2 = y ^ z;

const x3 = ~ z;

const x4 = y << z;

const x5 = y >> z;

const x6 = y >>> z;

x |= y;

x &= y;

x ^= y;

x <<= y;

x >>= y;

x >>>= y;
```

### Correct: the rule accepts this

```js
let x = y || z;

const x1 = y && z;

const x2 = y > z;

const x3 = y < z;

x += y;
```

Examples from the ESLint documentation.

## Enable it

### ESLint: `eslint.config.js`

```js
export default [
  {
    rules: {
      "no-bitwise": "error",
    },
  },
];
```

### Oxlint: `.oxlintrc.json`

```json
{
  "rules": {
    "no-bitwise": "error"
  }
}
```

### Biome: `biome.json`

```json
{
  "linter": {
    "rules": {
      "suspicious": {
        "noBitwiseOperators": "error"
      }
    }
  }
}
```

## Presets that enable it

| Preset | Linter | Package | Rules | Weekly downloads | Trend |
| --- | --- | --- | --- | --- | --- |
| [Airbnb base](https://lintradar.dev/presets/airbnb-base.md) | ESLint | `eslint-config-airbnb-base` | 241 | 6.5M | +2.1% |
| [Airbnb](https://lintradar.dev/presets/airbnb.md) | ESLint | `eslint-config-airbnb` | 346 | 3.4M | +2.3% |
| [Ultracite for Biome](https://lintradar.dev/presets/ultracite-biome.md) | Biome | `ultracite` | 616 | 2.1M | +151.7% |
| [Ultracite for Oxlint](https://lintradar.dev/presets/ultracite-oxlint.md) | Oxlint | `ultracite` | 475 | 2.1M | +151.7% |
| [React Native](https://lintradar.dev/presets/react-native.md) | ESLint | `@react-native/eslint-config` | 79 | 1.2M | +5.8% |
| [XO](https://lintradar.dev/presets/xo.md) | ESLint | `eslint-config-xo` | 618 | 413K | −5.0% |

## Related rules

- [eslint/guard-for-in](https://lintradar.dev/rules/eslint/guard-for-in.md): Require `for-in` loops to include an `if` statement
- [eslint/vars-on-top](https://lintradar.dev/rules/eslint/vars-on-top.md): Require `var` declarations be placed at the top of their containing scope
- [eslint/grouped-accessor-pairs](https://lintradar.dev/rules/eslint/grouped-accessor-pairs.md): Require grouped accessor pairs in object literals and classes
- [eslint/block-scoped-var](https://lintradar.dev/rules/eslint/block-scoped-var.md): Enforce the use of variables within the scope they are defined
- [eslint/prefer-object-spread](https://lintradar.dev/rules/eslint/prefer-object-spread.md): Disallow using `Object.assign` with an object literal as the first argument and prefer the use of object spread instead
- [eslint/no-promise-executor-return](https://lintradar.dev/rules/eslint/no-promise-executor-return.md): Disallow returning values from Promise executor functions

---

Web page: https://lintradar.dev/rules/eslint/no-bitwise. Data from npm and the linters' documentation, collected Dec 4, 2026. Site guide for agents: https://lintradar.dev/llms.txt
