unstale

npm / eslint-plugin-mocha

eslint-plugin-mocha

What changed in eslint-plugin-mocha 12, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-19.

13 breaking13 new APIs and options6 behavior and defaults1 tooling8 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli on npm

eslint-plugin-mocha 1241 changes

Breaking changes 13

  • The rule now reports imported Mocha interface methods.

    12.0.0release notes

  • ESLint v10.2.0 or later is now required.

    12.0.0release notes

  • The rule now requires done callback handling in every branch.

    12.0.0release notes

  • The setting name changed from exports to require; update configurations using the previous setting name.

    12.0.0release notes

  • The rule was renamed to no-top-level-tests; update configurations that reference the old name.

    12.0.0release notes

  • The rule was renamed to no-hooks-for-single-child; update configurations that reference the old name.

    12.0.0release notes

  • The rule now catches this.skip().

    12.0.0release notes

  • The rule was renamed to no-return-and-done; update configurations that reference the old name.

    12.0.0release notes

  • The rule was renamed to no-setup-in-suite; update configurations that reference the old name.

    12.0.0release notes

  • Its functionality moved into consistent-structure; update configurations that enable the old rule.

    12.0.0release notes

  • The no-synchronous-tests option was renamed to allowedAsyncMethods; update configurations that use the old option.

    12.0.0release notes

  • The rule was renamed to no-root-hooks; update configurations that reference the old name.

    12.0.0release notes

  • The recommended config defaults were adjusted, which may change the rules applied by this config.

    12.0.0release notes

New APIs and options 13

  • A rule for enforcing suite ordering was added.

    12.0.0release notes

  • Custom hook names are now supported.

    12.0.0release notes

  • Custom exports wrapper functions are now supported.

    12.0.0release notes

  • A rule for limiting retry settings was added.

    12.0.0release notes

  • A rule for limiting slow test settings was added.

    12.0.0release notes

  • A rule for limiting timeout settings was added.

    12.0.0release notes

  • A rule forbidding async callbacks that use done was added.

    12.0.0release notes

  • A rule for detecting async operations in synchronous tests was added.

    12.0.0release notes

  • A rule to reject code after done() was added.

    12.0.0release notes

  • A rule for detecting conditional tests was added.

    12.0.0release notes

  • A rule to reject multiple done() calls was added.

    12.0.0release notes

  • A rule for detecting nested suites was added.

    12.0.0release notes

  • An allow option was added to no-setup-in-describe, now named no-setup-in-suite.

    12.0.0release notes

Behavior and default changes 6

Tooling 1

Fixes and other changes 8

  • Fixes the rule for object property callbacks.

    12.0.2release notes

  • Fixes handle-done-callback for nested callback handoffs.

    12.0.1release notes

  • Usage of Mocha interface methods that are not configured is no longer flagged.

    12.0.0release notes

  • An autofix was added.

    12.0.0release notes

  • The rule now handles TypeScript this parameters.

    12.0.0release notes

  • The fixer now guards against await expressions.

    12.0.0release notes

  • Fixed the fixer for commented concise bodies.

    12.0.0release notes

  • Fixed false positives for nested functions.

    12.0.0release notes