# id-denylist

Rule `eslint/id-denylist`. Disallow specified identifiers

- Source: eslint
- Technologies: JavaScript
- Kind: style
- Needs type information: no
- Autofix: no
- Reach: 2.1M weekly downloads of presets that enable it
- Trend: +151.7% last quarter
- Rank: #1511 by reach, #15 by growth

## Linters

| Linter | Rule name | Recommended | Autofix | Details | Docs |
| --- | --- | --- | --- | --- | --- |
| ESLint | `id-denylist` | no | no | package `eslint` | [docs](https://eslint.org/docs/latest/rules/id-denylist) |
| Oxlint | `id-denylist` | no | no | plugin `eslint`, category style | [docs](https://oxc.rs/docs/guide/usage/linter/rules/eslint/id-denylist.html) |

## Code examples

### Incorrect: the rule reports this

```js
const data = { ...values };

function callback() {
    // ...
}

element.callback = function() {
    // ...
};

const itemSet = {
    data: [...values]
};

class Foo {
    data = [];
}

class Bar {
    #data = [];
}

class Baz {
    callback() {}
}

class Qux {
    #callback() {}
}
```

### Correct: the rule accepts this

```js
const encodingOptions = {...values};

function processFileResult() {
    // ...
}

element.successHandler = function() {
    // ...
};

const itemSet = {
    entities: [...values]
};

callback(); // all function calls are ignored

foo.callback(); // all function calls are ignored

foo.data; // all property names that are not assignments are ignored

class Foo {
    items = [];
}

class Bar {
    #items = [];
}

class Baz {
    method() {}
}

// …
```

Examples from the ESLint documentation.

## Enable it

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

```js
export default [
  {
    rules: {
      "id-denylist": "error",
    },
  },
];
```

### Oxlint: `.oxlintrc.json`

```json
{
  "rules": {
    "id-denylist": "error"
  }
}
```

## Presets that enable it

| Preset | Linter | Package | Rules | Weekly downloads | Trend |
| --- | --- | --- | --- | --- | --- |
| [Ultracite for Oxlint](https://lintradar.dev/presets/ultracite-oxlint.md) | Oxlint | `ultracite` | 475 | 2.1M | +151.7% |

## Related rules

- [eslint/id-match](https://lintradar.dev/rules/eslint/id-match.md): Require identifiers to match a specified regular expression
- [eslint/no-duplicate-imports](https://lintradar.dev/rules/eslint/no-duplicate-imports.md): Disallow duplicate module imports
- [eslint/no-inline-comments](https://lintradar.dev/rules/eslint/no-inline-comments.md): Disallow inline comments after code
- [eslint/sort-vars](https://lintradar.dev/rules/eslint/sort-vars.md): Require variables within the same declaration block to be sorted
- [eslint/func-style](https://lintradar.dev/rules/eslint/func-style.md): Enforce the consistent use of either `function` declarations or expressions assigned to variables
- [eslint/require-await](https://lintradar.dev/rules/eslint/require-await.md): Disallow async functions which have no `await` expression

---

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