npm / eslint-plugin-mocha
eslint-plugin-mocha
What changed in eslint-plugin-mocha 5 to 12, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-30.
29 breaking21 new APIs and options7 performance9 behavior and defaults2 tooling15 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initeslint-plugin-mocha 1241 changes
Breaking changes 13
The rule now reports imported Mocha interface methods.
ESLint v10.2.0 or later is now required.
The rule now requires done callback handling in every branch.
The setting name changed from exports to require; update configurations using the previous setting name.
The rule was renamed to no-top-level-tests; update configurations that reference the old name.
The rule was renamed to no-hooks-for-single-child; update configurations that reference the old name.
The rule now catches this.skip().
The rule was renamed to no-return-and-done; update configurations that reference the old name.
The rule was renamed to no-setup-in-suite; update configurations that reference the old name.
Its functionality moved into consistent-structure; update configurations that enable the old rule.
The no-synchronous-tests option was renamed to allowedAsyncMethods; update configurations that use the old option.
The rule was renamed to no-root-hooks; update configurations that reference the old name.
The recommended config defaults were adjusted, which may change the rules applied by this config.
New APIs and options 13
A rule for enforcing suite ordering was added.
Custom hook names are now supported.
Custom exports wrapper functions are now supported.
A rule for limiting retry settings was added.
A rule for limiting slow test settings was added.
A rule for limiting timeout settings was added.
A rule forbidding async callbacks that use done was added.
A rule for detecting async operations in synchronous tests was added.
A rule to reject code after done() was added.
A rule for detecting conditional tests was added.
A rule to reject multiple done() calls was added.
A rule for detecting nested suites was added.
An allow option was added to no-setup-in-describe, now named no-setup-in-suite.
Behavior and default changes 6
The rule now supports hook ordering.
Done callback properties can now be handed off.
The rule now covers scheduling APIs.
The rule now provides suggestions.
Commented skips are now allowed.
The rule now provides suggestions.
Tooling 1
The rule now provides suggestions.
Fixes and other changes 8
Fixes the rule for object property callbacks.
Fixes handle-done-callback for nested callback handoffs.
Usage of Mocha interface methods that are not configured is no longer flagged.
An autofix was added.
The rule now handles TypeScript this parameters.
The fixer now guards against await expressions.
Fixed the fixer for commented concise bodies.
Fixed false positives for nested functions.
eslint-plugin-mocha 1116 changes
Breaking changes 9
Disallows extra properties in rule options.
Rules ending in -description were renamed to end in -title, so configurations using the old rule names must be updated.
The package switched to ESM.
Support for ESLint versions below 9 was dropped.
Flat configs are now the default.
Legacy configs are no longer supported.
The no-async-describe rule was renamed to no-async-suite.
The no-exports rule no longer supports CommonJS.
Support for Node.js 14, 16, and 18 was removed.
New APIs and options 2
A new consistent-interface rule was added.
Flat configs now have a name.
Behavior and default changes 1
A new resolve algorithm was implemented.
Tooling 1
Improves the exported plugin type.
Fixes and other changes 3
Fixes the type of the plugin object's configs field.
Stops adding loops to the current layer.
Fixes handling of suites in this rule.
eslint-plugin-mocha 103 changes
Breaking changes 1
Support for Node.js 12 is dropped.
New APIs and options 1
Adds the no-empty-description rule.
Behavior and default changes 1
The recommended configuration turns off no-hooks-for-single-case.
eslint-plugin-mocha 910 changes
Breaking changes 1
Support for Node.js v10 was dropped.
New APIs and options 1
Added an all config preset that enables all rules.
Performance 7
Improved the performance of this rule.
Improved the performance of this rule.
Improved the performance of this rule.
Improved the performance of this rule.
Improved the performance of this rule.
Improved the performance of this rule.
Improved the performance of this rule.
Fixes and other changes 1
Fixed a false positive reported by this rule.
eslint-plugin-mocha 84 changes
Breaking changes 2
The no-skipped-tests rule no longer provides an autofix.
All rules now consistently use shared settings, which may change how existing rule configurations behave.
New APIs and options 2
The handle-done-callback rule now accepts the ignoreSkipped option.
A new no-exports rule is available.
eslint-plugin-mocha 72 changes
New APIs and options 1
Adds meta.type to the plugin metadata.
Fixes and other changes 1
Adds the missing fixable: 'code' metadata.
eslint-plugin-mocha 65 changes
Breaking changes 1
Support for Node.js 6 was dropped.
New APIs and options 1
A new rule was implemented to detect returns from async tests.
Behavior and default changes 1
The recommended ruleset was revamped, changing which rules are recommended.
Fixes and other changes 2
The rule now correctly detects describe calls.
The rule now works with arrow functions.
eslint-plugin-mocha 52 changes
Breaking changes 2
Support for ESLint versions below 4.0.0 was removed.
Support for Node.js 4, 5, and 7 was removed.