This ESLint plugin, `eslint-plugin-mocha-no-only`, enforces a rule that prohibits the use of Mocha's `.only()` method on test keywords like `describe`, `context`, `it`, `specify`, `suite`, and `test`. Its primary purpose is to prevent developers from accidentally committing code that only runs a subset of their test suite, which can lead to false-positive CI/CD builds. The current stable version is `1.2.0`, which introduced support for ESLint v9.0.0 and updated internal dependencies. While there isn't a strict release cadence, the project is actively maintained to ensure compatibility with recent ESLint versions. It differentiates itself by providing a dedicated, straightforward solution for a common oversight in Mocha testing workflows, ensuring comprehensive test execution.
Verified import paths — ran on the pinned version, not inferred.
This import is for the plugin module itself, used in the 'plugins' object of the new ESLint flat configuration (eslint.config.js) since ESLint v9.
When configuring the rule, you must use the full ID including the plugin namespace 'mochaNoOnly/'.
For older CommonJS-based .eslintrc.js configurations (pre-ESLint v9), the plugin is typically added to the 'plugins' array by its name and resolved by ESLint.
Demonstrates how to set up `eslint-plugin-mocha-no-only` within the new ESLint flat configuration system (eslint.config.js), targeting only test files to prevent accidental `.only()` calls.
Breaking-change detection hasn't run for this library yet.
CVE tracking and dependency tree are planned for a later release.