npm / eslint-plugin-jest
eslint-plugin-jest
What changed in eslint-plugin-jest 29, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-17.
5 breaking10 new APIs and options1 performance5 behavior and defaults2 tooling26 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initeslint-plugin-jest 2949 changes
Breaking changes 5
The rule now reports export all declarations.
The rule now bans optional chaining in tests.
The rule now ensures printf specifiers in .each titles are valid.
The rule now reports on export = usage.
The rule now reports ERR_PACKAGE_PATH_NOT_EXPORTED errors when validating mock module paths.
New APIs and options 10
Adds the checkThenables option for custom promises.
Adds the prefer-mock-return-shorthand rule.
Adds the valid-expect-with-promise rule.
A new rule is available to configure in eslint-plugin-jest.
Adds the no-unnecessary-assertion rule.
Adds the no-unneeded-async-expect-function ESLint rule.
A new rule is available for configuring ESLint checks.
A new rule is available for configuring ESLint checks.
Adds the valid-mock-module-path rule.
The rule can now be configured to ignore todo tests.
Performance 1
Parsing is cached for nodes that turn out not to be Jest function calls.
Behavior and default changes 5
The rule now allows expect assertions in beforeEach hooks.
Only report optional chaining when allowOptionalChaining is false.
The rule greatly improves checking whether mutable variables are used.
The rule now supports the toBeNaN matcher when checking for unnecessary assertions.
The rule supports basic uses of hasAssertions in beforeEach and afterEach hooks.
Tooling 2
Adds support for ESLint v10.
Added TypeScript as an optional peer dependency.
Fixes and other changes 26
The rule now checks dynamic imports.
Most rules now account for optional chaining, improving how they handle code that uses it.
The rule no longer drops
onlyandskipfromeachchains.No longer crashes when expect is called without an argument.
The rule now accounts for optional chaining.
No longer crashes on a matcher without an argument.
No longer crashes on an expect chain without a value.
The no-export rule now handles literal property accessors.
The no-export rule now handles nested assignment chains.
The rule now checks for the exports global.
The rule no longer crashes on an expect chain without a value.
No longer crashes on an expect chain without a value.
No longer crashes on an expect chain without a value.
The rule no longer reports assignments to local variables named module.
Treats describe blocks as test files when applying the no-export rule.
The rule no longer reports virtual mocks.
TypeScript v7 is now allowed as a peer dependency.
The rule no longer reports unnecessary assertions for any and unknown types.
The rule now ignores use of update expressions.
The rule now ignores async implementations.
The rule no longer reports mutable implementations.
The rule now ignores inline use of jest.mocked(...).
The rule no longer crashes on it.todo.
The rule now ignores resolve and reject chains for now, avoiding unnecessary assertion reports on those chains.
The rule now checks that the current matcher is toHaveLength.
The rule's error message now uses the correct word.