Registry / devops / eslint-find-rules

eslint-find-rules

JSON →
library5.0.0jsnpmunverified

ESLint utility (v5.0.0, released Dec 2024) that finds built-in and plugin rules missing from your custom ESLint config. Supports both legacy (.eslintrc) and flat config (eslint.config.js). Offers options to list all available rules, current rules, deprecated rules, plugin-specific rules, and unused rules. Actively maintained with support for ESLint v8.57+ and v9.18+. Compatible with Node >=18.20. Differentiators: CLI-first, zero-config for simple use, explicit flag for flat config, and options to include/exclude deprecated or core rules.

npm install eslint-find-rules
INSTALL
IMPORT
SIG · ESLINT-FIND-RULES
E
eslint-find-rules
devopsjavascriptv5.0.0
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

cli
npx eslint-find-rules --unused .eslintrc.js
CLI tool, not a library. Use as npm script or npx.
programmatic API
const { findRules } = require('eslint-find-rules');
Programmatic API is available but undocumented; CLI is the primary interface.
module
import { findRules } from 'eslint-find-rules';
ESM import works if package is used in a module context (package.json type: module).

Shows how to add eslint-find-rules as an npm script to detect unused or missing rules in your ESLint config.

// package.json { "scripts": { "find-unused": "eslint-find-rules --unused .eslintrc.js" }, "devDependencies": { "eslint-find-rules": "^5.0.0" } } // Then run: // npm run find-unused // For flat config: // eslint-find-rules --unused eslint.config.js --flatConfig // All available options: // eslint-find-rules --all-available .eslintrc.js // eslint-find-rules --current .eslintrc.js // eslint-find-rules --deprecated .eslintrc.js // eslint-find-rules --plugin .eslintrc.js
eslint-find-rules --version
Debug
Known issues
breakingRequires Node >= 18.20 and ESLint >= 8.57.1
fix
Upgrade Node to 18.20+ and ESLint to 8.57.1+ or 9.18+
affects: >=5.0.0
deprecatedSupport for ESLint < 8.57.1 dropped in v5
fix
Pin to eslint-find-rules@4.x if using older ESLint
affects: <5.0.0
breakingSupport for ESLint < 7 dropped in v4.0.0
fix
Use ESLint >= 7 or stick to v3.x
affects: >=4.0.0 <5.0.0
gotchaUsing globally installed eslint-find-rules will fail if ESLint and plugins are not also global
fix
Install eslint-find-rules as a devDependency and run via npm script
affects: >=1.0.0
gotchaBy default, deprecated rules are omitted from --all-available, --plugin, and --unused output
fix
Add --include deprecated or -i deprecated flag to include deprecated rules
affects: >=1.0.0
breakingFlat config support requires --flatConfig flag; without it, legacy mode is assumed
fix
Add --flatConfig to the command when using eslint.config.js
affects: >=4.2.0
Errors
Common errors & fixes
Error: Cannot find module 'eslint'
eslint not installed or not in node_modules
fix
npm install eslint --save-dev
Error: ESLint configuration is invalid
Provided config file has syntax errors or is not a valid ESLint config
fix
Check the config file for errors, ensure it exports a valid config object
Error: Unknown option '--flatConfig'
Using an older version (<4.2.0) of eslint-find-rules that doesn't support flat config
fix
Upgrade eslint-find-rules to v4.2.0+ with npm install eslint-find-rules@latest
Error: Process exited with code 1 (no error message)
Deprecated or unused rules found; tool exits with non-zero by default
fix
Add -n/--no-error flag if you want to suppress exit code
Upgrade
Version history
5.0.0latest on npm
Audit
Dependencies
eslintrequiredPeer dependency: requires ESLint ^8.57.1 || ^9.18.0 to function
Agent activity
2 hits · last 30 days
node
2
Resources
eslint-find-rules — npm install eslint-find-rules · libregistry