# no-nonoctal-decimal-escape

Rule `eslint/no-nonoctal-decimal-escape`. Disallow `\8` and `\9` escape sequences in string literals

- Source: eslint
- Technologies: JavaScript
- Kind: correctness
- Needs type information: no
- Autofix: yes, in at least one linter
- Reach: 272.8M weekly downloads of presets that enable it
- Trend: +46.5% last quarter
- Rank: #43 by reach, #876 by growth

## Linters

| Linter | Rule name | Recommended | Autofix | Details | Docs |
| --- | --- | --- | --- | --- | --- |
| ESLint | `no-nonoctal-decimal-escape` | yes | suggestion | package `eslint` | [docs](https://eslint.org/docs/latest/rules/no-nonoctal-decimal-escape) |
| Oxlint | `no-nonoctal-decimal-escape` | yes | safe | plugin `eslint`, category correctness | [docs](https://oxc.rs/docs/guide/usage/linter/rules/eslint/no-nonoctal-decimal-escape.html) |
| Biome | `correctness/noNonoctalDecimalEscape` | yes | safe | group correctness, since 1.0.0 | [docs](https://biomejs.dev/linter/rules/no-nonoctal-decimal-escape/) |

## Code examples

### Incorrect: the rule reports this

```js
"\8";

"\9";

const foo = "w\8less";

const bar = "December 1\9";

const baz = "Don't use \8 and \9 escapes.";

const quux = "\0\8";
```

### Correct: the rule accepts this

```js
"8";

"9";

const foo = "w8less";

const bar = "December 19";

const baz = "Don't use \\8 and \\9 escapes.";

const quux = "\0\u0038";
```

Examples from the ESLint documentation.

## Enable it

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

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

### Oxlint: `.oxlintrc.json`

```json
{
  "rules": {
    "no-nonoctal-decimal-escape": "error"
  }
}
```

### Biome: `biome.json`

```json
{
  "linter": {
    "rules": {
      "correctness": {
        "noNonoctalDecimalEscape": "error"
      }
    }
  }
}
```

## Presets that enable it

| Preset | Linter | Package | Rules | Weekly downloads | Trend |
| --- | --- | --- | --- | --- | --- |
| [ESLint recommended](https://lintradar.dev/presets/eslint-recommended.md) | ESLint | `@eslint/js` | 64 | 178.8M | +25.9% |
| [Oxlint default](https://lintradar.dev/presets/oxlint-default.md) | Oxlint | `oxlint` | 111 | 50.8M | +183.6% |
| [Biome recommended](https://lintradar.dev/presets/biome-recommended.md) | Biome | `@biomejs/biome` | 491 | 28.5M | +106.8% |
| [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% |
| [Nuxt](https://lintradar.dev/presets/nuxt.md) | ESLint | `@nuxt/eslint-config` | 188 | 1.5M | +72.8% |
| [Google TypeScript Style](https://lintradar.dev/presets/gts.md) | ESLint | `gts` | 71 | 553.3K | +10.3% |
| [XO](https://lintradar.dev/presets/xo.md) | ESLint | `eslint-config-xo` | 618 | 413K | −5.0% |
| [eslint-config-love](https://lintradar.dev/presets/love.md) | ESLint | `eslint-config-love` | 258 | 171.7K | +39.3% |

## Related rules

- [eslint/no-dupe-else-if](https://lintradar.dev/rules/eslint/no-dupe-else-if.md): Disallow duplicate conditions in if-else-if chains
- [eslint/no-unsafe-optional-chaining](https://lintradar.dev/rules/eslint/no-unsafe-optional-chaining.md): Disallow use of optional chaining in contexts where the `undefined` value is not allowed
- [eslint/for-direction](https://lintradar.dev/rules/eslint/for-direction.md): Enforce `for` loop update clause moving the counter in the right direction
- [eslint/no-setter-return](https://lintradar.dev/rules/eslint/no-setter-return.md): Disallow returning values from setters
- [eslint/no-import-assign](https://lintradar.dev/rules/eslint/no-import-assign.md): Disallow assigning to imported bindings
- [eslint/no-unused-private-class-members](https://lintradar.dev/rules/eslint/no-unused-private-class-members.md): Disallow unused private class members

---

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