# no-deprecated-functions

Rule `jest/no-deprecated-functions`. Disallow use of deprecated functions

- Source: jest
- Technologies: Testing
- Kind: style
- Needs type information: no
- Autofix: yes, in at least one linter
- Reach: 16.7M weekly downloads of presets that enable it
- Trend: +10.1% last quarter
- Rank: #661 by reach, #1468 by growth

## Linters

| Linter | Rule name | Recommended | Autofix | Details | Docs |
| --- | --- | --- | --- | --- | --- |
| ESLint | `jest/no-deprecated-functions` | yes | safe | package `eslint-plugin-jest` | [docs](https://github.com/jest-community/eslint-plugin-jest/blob/v29.17.2/docs/rules/no-deprecated-functions.md) |
| Oxlint | `jest/no-deprecated-functions` | no | safe | plugin `jest`, category style | [docs](https://oxc.rs/docs/guide/usage/linter/rules/jest/no-deprecated-functions.html) |

## Code examples

### Incorrect: the rule reports this

```js
jest.resetModuleRegistry // since Jest 15
jest.addMatchers // since Jest 17
```

Examples from the Oxlint documentation.

## Enable it

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

```js
import jest from "eslint-plugin-jest";

export default [
  {
    plugins: { jest },
    rules: {
      "jest/no-deprecated-functions": "error",
    },
  },
];
```

### Oxlint: `.oxlintrc.json`

```json
{
  "plugins": [
    "jest"
  ],
  "rules": {
    "jest/no-deprecated-functions": "error"
  }
}
```

## Presets that enable it

| Preset | Linter | Package | Rules | Weekly downloads | Trend |
| --- | --- | --- | --- | --- | --- |
| [Jest recommended](https://lintradar.dev/presets/jest-recommended.md) | ESLint | `eslint-plugin-jest` | 19 | 16.7M | +10.1% |

## Related rules

- [jest/no-commented-out-tests](https://lintradar.dev/rules/jest/no-commented-out-tests.md): Disallow commented out tests
- [jest/no-interpolation-in-snapshots](https://lintradar.dev/rules/jest/no-interpolation-in-snapshots.md): Disallow string interpolation inside snapshots
- [jest/no-alias-methods](https://lintradar.dev/rules/jest/no-alias-methods.md): Disallow alias methods
- [jest/no-mocks-import](https://lintradar.dev/rules/jest/no-mocks-import.md): Disallow manually importing from `__mocks__`
- [jest/valid-title](https://lintradar.dev/rules/jest/valid-title.md): Enforce valid titles
- [jest/no-test-prefixes](https://lintradar.dev/rules/jest/no-test-prefixes.md): Require using `.only` and `.skip` over `f` and `x`

---

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