# Jest recommended

Catches focused or disabled tests, missing assertions and invalid expect calls in Jest suites.

- Linter: ESLint
- Package: `eslint-plugin-jest` (https://github.com/jest-community/eslint-plugin-jest#recommended)
- Author: jest-community (official)
- Rules: 19
- Weekly downloads: 16.7M, +10.1% last quarter
- Technologies: testing (19)

## Install

```sh
npm install -D eslint eslint-plugin-jest
pnpm add -D eslint eslint-plugin-jest
yarn add -D eslint eslint-plugin-jest
bun add -d eslint eslint-plugin-jest
```

## Config: `eslint.config.js`

```js
// eslint.config.js
import jest from "eslint-plugin-jest";

export default [
  jest.configs["flat/recommended"],
];
```

## Rules it enables

| Rule | Severity | Description | Reach |
| --- | --- | --- | --- |
| [jest/no-focused-tests](https://lintradar.dev/rules/jest/no-focused-tests.md) | error | Disallow focused tests | 48.5M |
| [jest/no-identical-title](https://lintradar.dev/rules/jest/no-identical-title.md) | error | Disallow identical titles | 48.5M |
| [jest/no-export](https://lintradar.dev/rules/jest/no-export.md) | error | Disallow using `exports` in files containing tests | 47.3M |
| [jest/no-disabled-tests](https://lintradar.dev/rules/jest/no-disabled-tests.md) | warn | Disallow disabled tests | 18M |
| [jest/valid-expect](https://lintradar.dev/rules/jest/valid-expect.md) | error | Enforce valid `expect()` usage | 18M |
| [jest/expect-expect](https://lintradar.dev/rules/jest/expect-expect.md) | warn | Enforce assertion to be made in a test body | 16.7M |
| [jest/no-conditional-expect](https://lintradar.dev/rules/jest/no-conditional-expect.md) | error | Disallow calling `expect` conditionally | 16.7M |
| [jest/no-done-callback](https://lintradar.dev/rules/jest/no-done-callback.md) | error | Disallow using a callback in asynchronous tests and hooks | 16.7M |
| [jest/no-jasmine-globals](https://lintradar.dev/rules/jest/no-jasmine-globals.md) | error | Disallow Jasmine globals | 16.7M |
| [jest/no-standalone-expect](https://lintradar.dev/rules/jest/no-standalone-expect.md) | error | Disallow using `expect` outside of `it` or `test` blocks | 16.7M |
| [jest/valid-title](https://lintradar.dev/rules/jest/valid-title.md) | error | Enforce valid titles | 16.7M |
| [jest/no-alias-methods](https://lintradar.dev/rules/jest/no-alias-methods.md) | error | Disallow alias methods | 16.7M |
| [jest/no-commented-out-tests](https://lintradar.dev/rules/jest/no-commented-out-tests.md) | warn | Disallow commented out tests | 16.7M |
| [jest/no-deprecated-functions](https://lintradar.dev/rules/jest/no-deprecated-functions.md) | error | Disallow use of deprecated functions | 16.7M |
| [jest/no-interpolation-in-snapshots](https://lintradar.dev/rules/jest/no-interpolation-in-snapshots.md) | error | Disallow string interpolation inside snapshots | 16.7M |
| [jest/no-mocks-import](https://lintradar.dev/rules/jest/no-mocks-import.md) | error | Disallow manually importing from `__mocks__` | 16.7M |
| [jest/no-test-prefixes](https://lintradar.dev/rules/jest/no-test-prefixes.md) | error | Require using `.only` and `.skip` over `f` and `x` | 16.7M |
| [jest/valid-describe-callback](https://lintradar.dev/rules/jest/valid-describe-callback.md) | error | Enforce valid `describe()` callback | 16.7M |
| [jest/valid-expect-in-promise](https://lintradar.dev/rules/jest/valid-expect-in-promise.md) | error | Require promises that have expectations in their chain to be valid | 16.7M |

---

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