An ESLint plugin providing additional rules specifically for ESLint directive comments like // eslint-disable-line, // eslint-disable-next-line, and global comment directives. Version 3.2.0 is stable, with maintenance releases. It enforces best practices around disable/enable pairs, unused disable directives, and consistent use of eslint-env/eslint-enable. Differentiates from core ESLint rules by focusing exclusively on the correctness and hygiene of ESLint's own comment directives. Supports ESLint >=4.19.1 and Node >=6.5.0.
npm install eslint-plugin-eslint-commentsVerified import paths — ran on the pinned version, not inferred.
Shows how to enable the plugin and its recommended rules in an ESLint config.
Upgrade ESLint to >=4.19.1 and Node to >=6.5.0.
Manually enable eslint-comments/no-unused-disable if desired, or use --report-unused-disable-directives on CLI.
Update to v3.1.2 or later where autofix is removed.
Ensure ESLint cache is cleared if rules appear stale.
Run npm install eslint-plugin-eslint-comments --save-dev and ensure 'eslint-comments' is in plugins list.
Use 'eslint-comments/disable-enable-pair' not 'disable-enable-pair'.
npm install eslint-plugin-eslint-comments --save-dev