npm / @vitest/eslint-plugin
@vitest/eslint-plugin
What changed in @vitest/eslint-plugin 1, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-20.
2 breaking9 new APIs and options5 behavior and defaults2 tooling39 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli init@vitest/eslint-plugin 157 changes
Breaking changes 2
Reverses the toThrow/toThrowError alias direction enforced by the rule.
The plugin now treats
.extendas exclusive.
New APIs and options 9
Adds the disallowHasAssertions option to prefer-expect-assertions.
Adds the require-test-timeout ESLint rule.
Adds the prefer-mock-return-shorthand rule for linting mock return shorthand.
Adds an option to disable autofix for prefer-import-in-mock.
Adds a new rule named prefer-to-have-been-called-times.
Adds the no-unneeded-async-expect-function rule.
Adds the consistent-each-for rule.
Adds the require-import-vi-mock rule.
Adds the require-awaited-expect-poll rule.
Behavior and default changes 5
The rule now supports ancestor traversal when checking test timeouts.
The plugin now allows timeout values to be declared as const variables in the same file.
The rule now supports doMock.
The rule ignores async implementations.
The no-done-callback rule is no longer included in the 'all' list.
Tooling 2
A rule is added to the recommended Vitest ESLint config.
The plugin adds support for custom Vitest imports.
Fixes and other changes 39
Refined the reportEmptyTitle message for the valid-title rule.
The valid-title rule now handles a missing argument.
The plugin now detects test modes in options objects.
The valid-expect rule now supports expect.assert members.
Fixes the rule to accept poll and element with 1 or 2 arguments.
Handles static expect APIs.
Handles expect.any separately from the Chai any flag.
Support Chai-style expect chains.
Map the calledOnce matcher to exact once with.
Detects vitest.mock and aliased vi/vitest mock calls.
Treats imported bindings as explicit timeouts.
Treats .finally() as part of async assertion promise chains.
Corrects the requiresTypeChecking metadata for four rules.
The rule now allows expect inside vi.defineHelper callbacks.
The rule now recommends toBeTypeOf instead of expectTypeOf.
Re-enables the unbound-method rule, allowing developers to use it in their ESLint configuration.
Class/function type detection is more reliable.
The rule now reports all chainable APIs, helping prevent focused tests from going undetected.
Corrected the package’s distributed entrypoints and type paths.
Fixes default value propagation in the plugin.
The rule takes expect.assertions into account when checking for conditional expectations.
The rule ignores use of update expressions.
The rule no longer reports mutable implementations.
Treats vitest and vi the same.
The rule now ignores functions passed to
vi.mocked.Results of test.extend are now treated as test calls.
Fixes a regression in prefer-hooks-on-top when using test.scoped.
Fixes a regression in valid-title when using test.scoped.
The rule now aliases toThrow to toThrowError, aligning it with Vitest.
The rule handles aliased Vitest imports when enforcing consistent test names.
Fixes potential false positives when using it.scoped.
Fixes false positives when using test.for.
Fixes potential false positives when using it.scoped.
Preserves TypeScript generic parameters for this rule, preventing them from being lost.
The plugin now supports describe.for chains.
The plugin now supports
.scoped.Fixes a false positive when using .for.
Corrects the rule’s expected options type.
The rule now supports it.for and test.for chains.