{"id":19632,"library":"eslint-find-rules","title":"eslint-find-rules","description":"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.","status":"active","version":"5.0.0","language":"javascript","source_language":"en","source_url":"https://github.com/sarbbottam/eslint-find-rules","tags":["javascript"],"install":[{"cmd":"npm install eslint-find-rules","lang":"bash","label":"npm"},{"cmd":"yarn add eslint-find-rules","lang":"bash","label":"yarn"},{"cmd":"pnpm add eslint-find-rules","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Peer dependency: requires ESLint ^8.57.1 || ^9.18.0 to function","package":"eslint","optional":false}],"imports":[{"note":"CLI tool, not a library. Use as npm script or npx.","wrong":"","symbol":"cli","correct":"npx eslint-find-rules --unused .eslintrc.js"},{"note":"Programmatic API is available but undocumented; CLI is the primary interface.","wrong":"","symbol":"programmatic API","correct":"const { findRules } = require('eslint-find-rules');"},{"note":"ESM import works if package is used in a module context (package.json type: module).","wrong":"","symbol":"module","correct":"import { findRules } from 'eslint-find-rules';"}],"quickstart":{"code":"// package.json\n{\n  \"scripts\": {\n    \"find-unused\": \"eslint-find-rules --unused .eslintrc.js\"\n  },\n  \"devDependencies\": {\n    \"eslint-find-rules\": \"^5.0.0\"\n  }\n}\n\n// Then run:\n// npm run find-unused\n\n// For flat config:\n// eslint-find-rules --unused eslint.config.js --flatConfig\n\n// All available options:\n// eslint-find-rules --all-available .eslintrc.js\n// eslint-find-rules --current .eslintrc.js\n// eslint-find-rules --deprecated .eslintrc.js\n// eslint-find-rules --plugin .eslintrc.js","lang":"javascript","description":"Shows how to add eslint-find-rules as an npm script to detect unused or missing rules in your ESLint config."},"warnings":[{"fix":"Upgrade Node to 18.20+ and ESLint to 8.57.1+ or 9.18+","message":"Requires Node >= 18.20 and ESLint >= 8.57.1","severity":"breaking","affected_versions":">=5.0.0"},{"fix":"Pin to eslint-find-rules@4.x if using older ESLint","message":"Support for ESLint < 8.57.1 dropped in v5","severity":"deprecated","affected_versions":"<5.0.0"},{"fix":"Use ESLint >= 7 or stick to v3.x","message":"Support for ESLint < 7 dropped in v4.0.0","severity":"breaking","affected_versions":">=4.0.0 <5.0.0"},{"fix":"Install eslint-find-rules as a devDependency and run via npm script","message":"Using globally installed eslint-find-rules will fail if ESLint and plugins are not also global","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Add --include deprecated or -i deprecated flag to include deprecated rules","message":"By default, deprecated rules are omitted from --all-available, --plugin, and --unused output","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Add --flatConfig to the command when using eslint.config.js","message":"Flat config support requires --flatConfig flag; without it, legacy mode is assumed","severity":"breaking","affected_versions":">=4.2.0"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"npm install eslint --save-dev","cause":"eslint not installed or not in node_modules","error":"Error: Cannot find module 'eslint'"},{"fix":"Check the config file for errors, ensure it exports a valid config object","cause":"Provided config file has syntax errors or is not a valid ESLint config","error":"Error: ESLint configuration is invalid"},{"fix":"Upgrade eslint-find-rules to v4.2.0+ with npm install eslint-find-rules@latest","cause":"Using an older version (<4.2.0) of eslint-find-rules that doesn't support flat config","error":"Error: Unknown option '--flatConfig'"},{"fix":"Add -n/--no-error flag if you want to suppress exit code","cause":"Deprecated or unused rules found; tool exits with non-zero by default","error":"Error: Process exited with code 1 (no error message)"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}