{"id":19744,"library":"eslint-plugin-eslint-plugin","title":"eslint-plugin-eslint-plugin","description":"An ESLint plugin that provides a set of rules for linting ESLint plugins themselves. It helps plugin authors follow best practices, avoid deprecated APIs, and maintain consistency in meta properties and tests. As of v7.3.2, it requires ESLint >=9.0.0 and Node >=20.19.0. Version 7 broke compatibility with ESLint v8 and flat config prefixes. It supports CJS, ESM, and TypeScript plugin source files. Ships with recommended configs and autofix rules. Maintained under the eslint-community organization.","status":"active","version":"7.3.2","language":"javascript","source_language":"en","source_url":"https://github.com/eslint-community/eslint-plugin-eslint-plugin","tags":["javascript","eslint","eslintplugin","eslint-plugin","typescript"],"install":[{"cmd":"npm install eslint-plugin-eslint-plugin","lang":"bash","label":"npm"},{"cmd":"yarn add eslint-plugin-eslint-plugin","lang":"bash","label":"yarn"},{"cmd":"pnpm add eslint-plugin-eslint-plugin","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Peer dependency - the plugin lints ESLint plugins, so ESLint must be installed.","package":"eslint","optional":false}],"imports":[{"note":"The package is ESM-only from v7 onwards. CJS require() will fail.","wrong":"const eslintPlugin = require('eslint-plugin-eslint-plugin')","symbol":"plugin (default export)","correct":"import eslintPlugin from 'eslint-plugin-eslint-plugin'"},{"note":"As of v7, flat configs are directly on the plugin object under configs. The old 'flat/' prefix paths are removed.","wrong":"require('eslint-plugin-eslint-plugin/flat/recommended')","symbol":"flat config (recommended)","correct":"eslintPlugin.configs.recommended"},{"note":"In ESLint's flat config (>=9), use the plugin object. The 'eslint-plugin' name is optional; you can also use the full name in eslintrc.","wrong":"plugins: ['eslint-plugin-eslint-plugin']","symbol":"rules (legacy eslintrc)","correct":"plugins: ['eslint-plugin']"}],"quickstart":{"code":"// eslint.config.js\nimport eslintPlugin from 'eslint-plugin-eslint-plugin';\n\nexport default [\n  eslintPlugin.configs.recommended,\n  {\n    rules: {\n      'eslint-plugin/fixer-return': 'error',\n    },\n  },\n];","lang":"javascript","description":"Flat config example using the plugin's recommended preset and enabling a specific rule."},"warnings":[{"fix":"Upgrade to ESLint >=9.0.0 and use flat config. Use eslintPlugin.configs.recommended instead of eslint-plugin-eslint-plugin/flat/recommended.","message":"v7.0.0 dropped support for ESLint v8 and the old eslintrc config format. The 'flat/' prefix from config paths is removed; configs are now directly on eslintPlugin.configs.","severity":"breaking","affected_versions":">=7.0.0"},{"fix":"If you were explicitly disabling these rules, you may need to adjust your config. Check the recommended preset: it now includes them.","message":"v7.0.0 enabled several existing rules as recommended: no-meta-replaced-by, no-meta-schema-default, require-meta-default-options, require-meta-schema-description. These were previously optional.","severity":"breaking","affected_versions":">=7.0.0"},{"fix":"Use import or dynamic import(). If you need CJS, stick to v6.x.","message":"The package is ESM-only since v7.0.0. Using require() in CommonJS will throw an error.","severity":"gotcha","affected_versions":">=7.0.0"},{"fix":"Use context.sourceCode.getText() instead of context.getSource(), context.filename instead of context.getFilename(), etc.","message":"The no-deprecated-context-methods rule flags use of context.getSource(), context.getFilename(), etc. These methods are deprecated in ESLint.","severity":"deprecated","affected_versions":">=6.0.0"},{"fix":"When using flat config, assign the import to a variable and use that variable name as the plugin prefix in rule names.","message":"The plugin uses the 'eslint-plugin' prefix by convention in flat config. If you import the plugin with a different name, rule references must match that name.","severity":"gotcha","affected_versions":">=7.0.0"},{"fix":"Upgrade Node to >=18.18.0 or use older plugin version.","message":"v6.0.0 removed support for Node.js <18.18.0. If you need older Node, stick to v5.x.","severity":"breaking","affected_versions":">=6.0.0"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Use import() or switch to an ESM config file (e.g., rename eslint.config.js to eslint.config.mjs).","cause":"ESM-only package since v7, but using require() in a CommonJS context.","error":"Error [ERR_REQUIRE_ESM]: require() of ES Module /path/to/node_modules/eslint-plugin-eslint-plugin/dist/index.js from /path/to/eslint.config.js not supported."},{"fix":"Use: import eslintPlugin from 'eslint-plugin-eslint-plugin'; then add eslintPlugin.configs.recommended (or { plugins: { 'eslint-plugin': eslintPlugin } }).","cause":"In flat config, the plugin must be imported and passed as an object with a 'plugins' key, or used via the configs object. The string name is not recognized.","error":"ESLint couldn't find the plugin 'eslint-plugin-eslint-plugin'."},{"fix":"Check the list of rules in the docs. For v7, ensure the rule name is correct (e.g., 'require-meta-docs-description' still exists).","cause":"The rule may not exist or may have been renamed/removed. In v7, some rules were removed or renamed.","error":"Configuration for rule 'eslint-plugin/require-meta-docs-description' is invalid. Value \"error\" is unknown."},{"fix":"Run: npm install eslint-plugin-eslint-plugin --save-dev","cause":"The package is not installed or not in node_modules.","error":"Cannot find module 'eslint-plugin-eslint-plugin'"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}