unstale

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

@unstale/cli on npm

@vitest/eslint-plugin 157 changes

Breaking changes 2

  • Reverses the toThrow/toThrowError alias direction enforced by the rule.

    1.6.12release notes

  • The plugin now treats .extend as exclusive.

    1.4.0release notes

New APIs and options 9

  • Adds the disallowHasAssertions option to prefer-expect-assertions.

    1.6.23release notes

  • Adds the require-test-timeout ESLint rule.

    1.6.6release notes

  • Adds the prefer-mock-return-shorthand rule for linting mock return shorthand.

    1.6.4release notes

  • Adds an option to disable autofix for prefer-import-in-mock.

    1.6.3release notes

  • Adds a new rule named prefer-to-have-been-called-times.

    1.6.1release notes

  • Adds the no-unneeded-async-expect-function rule.

    1.5.3release notes

  • Adds the consistent-each-for rule.

    1.4.4release notes

  • Adds the require-import-vi-mock rule.

    1.4.4release notes

  • Adds the require-awaited-expect-poll rule.

    1.4.2release notes

Behavior and default changes 5

  • The rule now supports ancestor traversal when checking test timeouts.

    1.6.16release notes

  • The plugin now allows timeout values to be declared as const variables in the same file.

    1.6.15release notes

  • The rule now supports doMock.

    1.6.10release notes

  • The rule ignores async implementations.

    1.6.5release notes

  • The no-done-callback rule is no longer included in the 'all' list.

    1.4.0release notes

Tooling 2

  • A rule is added to the recommended Vitest ESLint config.

    1.5.0release notes

  • The plugin adds support for custom Vitest imports.

    1.3.21release notes

Fixes and other changes 39

  • Refined the reportEmptyTitle message for the valid-title rule.

    1.6.27release notes

  • The valid-title rule now handles a missing argument.

    1.6.27release notes

  • The plugin now detects test modes in options objects.

    1.6.26release notes

  • The valid-expect rule now supports expect.assert members.

    1.6.25release notes

  • Fixes the rule to accept poll and element with 1 or 2 arguments.

    1.6.24release notes

  • Handles static expect APIs.

    1.6.23release notes

  • Handles expect.any separately from the Chai any flag.

    1.6.22release notes

  • Support Chai-style expect chains.

    1.6.21release notes

  • Map the calledOnce matcher to exact once with.

    1.6.21release notes

  • Detects vitest.mock and aliased vi/vitest mock calls.

    1.6.20release notes

  • Treats imported bindings as explicit timeouts.

    1.6.20release notes

  • Treats .finally() as part of async assertion promise chains.

    1.6.20release notes

  • Corrects the requiresTypeChecking metadata for four rules.

    1.6.18release notes

  • The rule now allows expect inside vi.defineHelper callbacks.

    1.6.17release notes

  • The rule now recommends toBeTypeOf instead of expectTypeOf.

    1.6.17release notes

  • Re-enables the unbound-method rule, allowing developers to use it in their ESLint configuration.

    1.6.13release notes

  • Class/function type detection is more reliable.

    1.6.12release notes

  • The rule now reports all chainable APIs, helping prevent focused tests from going undetected.

    1.6.11release notes

  • Corrected the package’s distributed entrypoints and type paths.

    1.6.9release notes

  • Fixes default value propagation in the plugin.

    1.6.7release notes

  • The rule takes expect.assertions into account when checking for conditional expectations.

    1.6.5release notes

  • The rule ignores use of update expressions.

    1.6.5release notes

  • The rule no longer reports mutable implementations.

    1.6.5release notes

  • Treats vitest and vi the same.

    1.6.5release notes

  • The rule now ignores functions passed to vi.mocked.

    1.6.4release notes

  • Results of test.extend are now treated as test calls.

    1.6.0, 1.6.1release notesrelease notes

  • Fixes a regression in prefer-hooks-on-top when using test.scoped.

    1.5.2release notes

  • Fixes a regression in valid-title when using test.scoped.

    1.5.2release notes

  • The rule now aliases toThrow to toThrowError, aligning it with Vitest.

    1.5.1release notes

  • The rule handles aliased Vitest imports when enforcing consistent test names.

    1.5.0release notes

  • Fixes potential false positives when using it.scoped.

    1.4.4release notes

  • Fixes false positives when using test.for.

    1.4.4release notes

  • Fixes potential false positives when using it.scoped.

    1.4.4release notes

  • Preserves TypeScript generic parameters for this rule, preventing them from being lost.

    1.4.3release notes

  • The plugin now supports describe.for chains.

    1.4.0release notes

  • The plugin now supports .scoped.

    1.4.0release notes

  • Fixes a false positive when using .for.

    1.3.26release notes

  • Corrects the rule’s expected options type.

    1.3.25release notes

  • The rule now supports it.for and test.for chains.

    1.3.24release notes