by jest-community · eslint-plugin-jest
A few rules that keep Jest assertions consistent, such as preferring toHaveLength.
npm install -D eslint eslint-plugin-jest// eslint.config.js
import jest from "eslint-plugin-jest";
export default [
jest.configs["flat/style"],
];| Rule | Severity | Linters | Reach | Trend |
|---|---|---|---|---|
| jest/prefer-to-contain In ESLint, Oxlint, Biome4.2M reach · +10.1% | error | In ESLint, Oxlint, Biome | 4.2M | +10.1% |
| jest/prefer-to-have-length In ESLint, Oxlint, Biome4.2M reach · +10.1% | error | In ESLint, Oxlint, Biome | 4.2M | +10.1% |
| jest/prefer-to-be In ESLint, Oxlint4.2M reach · +10.1% | error | In ESLint, Oxlint | 4.2M | +10.1% |