not-an-aardvark/eslint-plugin-eslint-plugin

An ESLint plugin for linting ESLint plugins

235

stars

532

commits

TypeScript

primary language

Aug 26, 2026

updated

eslint
eslint-plugin

README

eslint-plugin-eslint-plugin CI NPM version Conventional Commits

An ESLint plugin for linting ESLint plugins. Rules written in CJS, ESM, and TypeScript are all supported.

Installation

You'll first need to install ESLint:

npm i eslint --save-dev

Next, install eslint-plugin-eslint-plugin:

npm install eslint-plugin-eslint-plugin --save-dev

Usage

Here's an example ESLint configuration that:

  • Enables the recommended configuration
  • Enables an optional/non-recommended rule

Note: you might need to set sourceType to module or script depending on your codebase.

// eslint.config.js
import eslintPlugin from 'eslint-plugin-eslint-plugin';

export default [
  eslintPlugin.configs.recommended,
  {
    rules: {
      'eslint-plugin/require-meta-docs-description': 'error',
    },
  },
];

Rules

💼 Configurations enabled in.
✅ Set in the recommended configuration.
🔧 Automatically fixable by the --fix CLI option.
💡 Manually fixable by editor suggestions.
💭 Requires type information.

Rules

Name                                     Description💼🔧💡💭
fixer-returnrequire fixer functions to return a fix
meta-property-orderingenforce the order of meta properties🔧
no-deprecated-context-methodsdisallow usage of deprecated methods on rule context objects🔧
no-deprecated-report-apidisallow the version of context.report() with multiple arguments🔧
no-incomplete-meta-schemarequire explicit policy choices in rule options schemas
no-incorrect-meta-schemadisallow rule options schema constructs that ESLint ignores
no-matching-violation-suggest-message-idsrequire suggestions to have different messageId than their parent report
no-meta-replaced-bydisallow using the meta.replacedBy rule property
no-meta-schema-defaultdisallow rules meta.schema properties to include defaults
no-missing-message-idsdisallow messageIds that are missing from meta.messages
no-missing-placeholdersdisallow missing placeholders in rule report messages
no-property-in-nodedisallow using in to narrow node types instead of looking at properties💭
no-unused-message-idsdisallow unused messageIds in meta.messages
no-unused-placeholdersdisallow unused placeholders in rule report messages
no-useless-token-rangedisallow unnecessary calls to sourceCode.getFirstToken() and sourceCode.getLastToken()🔧
prefer-message-idsrequire using messageId instead of message or desc to report rule violations
prefer-object-ruledisallow function-style rules🔧
prefer-placeholdersrequire using placeholders for dynamic report messages
prefer-replace-textrequire using replaceText() instead of replaceTextRange()
report-message-formatenforce a consistent format for rule report messages
require-meta-default-optionsrequire only rules with options to implement a meta.defaultOptions property🔧
require-meta-docs-descriptionrequire rules to implement a meta.docs.description property with the correct format
require-meta-docs-recommendedrequire rules to implement a meta.docs.recommended property💡
require-meta-docs-urlrequire rules to implement a meta.docs.url property🔧
require-meta-fixablerequire rules to implement a meta.fixable property
require-meta-has-suggestionsrequire suggestable rules to implement a meta.hasSuggestions property🔧
require-meta-languagesrequire rules to implement a meta.languages property
require-meta-schemarequire rules to implement a meta.schema property💡
require-meta-schema-descriptionrequire rules meta.schema properties to include descriptions
require-meta-typerequire rules to implement a meta.type property

Tests

Name                        Description💼🔧💡💭
consistent-outputenforce consistent use of output assertions in rule tests
no-identical-testsdisallow identical tests🔧
no-only-testsdisallow the test case property only💡
prefer-output-nulldisallow invalid RuleTester test cases where the output matches the code🔧
require-test-case-namerequire test cases to have a name property under certain conditions
require-test-error-positionsrequires the position of errors to be explicitly stated for all expected errors
test-case-property-orderingrequire the properties of a test case to be placed in a consistent order🔧
test-case-shorthand-stringsenforce consistent usage of shorthand strings for test cases with no options🔧
unique-test-case-namesenforce that all test cases with names have unique names

Presets

NameDescription
recommendedenables all recommended rules in this plugin
rules-recommendedenables all recommended rules that are aimed at linting ESLint rule files
tests-recommendedenables all recommended rules that are aimed at linting ESLint test files
allenables all rules in this plugin, excluding those requiring type information
all-type-checkedenables all rules in this plugin, including those requiring type information
rulesenables all rules that are aimed at linting ESLint rule files
testsenables all rules that are aimed at linting ESLint test files

Semantic versioning policy

The list of recommended rules will only change in a major release of this plugin. However, new non-recommended rules might be added in a minor release of this plugin. Therefore, using the all, rules, and tests presets is not recommended for production use, because the addition of new rules in a minor release could break your build.

Preset usage

Example of applying the recommended config to all files.

// eslint.config.js
import eslintPlugin from 'eslint-plugin-eslint-plugin';

export default [eslintPlugin.configs.recommended];

Or to apply linting only to the appropriate rule or test files:

// eslint.config.js
import eslintPlugin from 'eslint-plugin-eslint-plugin';

export default [
  {
    files: ['lib/rules/*.{js,ts}'],
    ...eslintPlugin.configs['rules-recommended'],
  },
  {
    files: ['tests/lib/rules/*.{js,ts}'],
    ...eslintPlugin.configs['tests-recommended'],
  },
];

Settings

You may set the following settings in your eslint.config.js

ruleTesterConstructors

The different names allowed for the constructors of the RuleTester. Can contain both string and RegExp. A string verifies a full match, while a RegExp uses RegExp.prototype.test().

This settings defaults to ['RuleTester'].

// eslint.config.js
export default [
  {
    settings: {
      'eslint-plugin': {
        ruleTesterConstructors: [/RuleTester$/, /^createRuleTester/],
      },
    },
  },
];

Contributors

(top 30 of 35)

aladdin-add

142 commits

bmish

135 commits

not-an-aardvark

77 commits

renovate[bot]

44 commits

not-an-aardvark/eslint-plugin-eslint-plugin

An ESLint plugin for linting ESLint plugins

235

stars

532

commits

TypeScript

primary language

Aug 26, 2026

updated

eslint
eslint-plugin

README

eslint-plugin-eslint-plugin CI NPM version Conventional Commits

An ESLint plugin for linting ESLint plugins. Rules written in CJS, ESM, and TypeScript are all supported.

Installation

You'll first need to install ESLint:

npm i eslint --save-dev

Next, install eslint-plugin-eslint-plugin:

npm install eslint-plugin-eslint-plugin --save-dev

Usage

Here's an example ESLint configuration that:

  • Enables the recommended configuration
  • Enables an optional/non-recommended rule

Note: you might need to set sourceType to module or script depending on your codebase.

// eslint.config.js
import eslintPlugin from 'eslint-plugin-eslint-plugin';

export default [
  eslintPlugin.configs.recommended,
  {
    rules: {
      'eslint-plugin/require-meta-docs-description': 'error',
    },
  },
];

Rules

💼 Configurations enabled in.
✅ Set in the recommended configuration.
🔧 Automatically fixable by the --fix CLI option.
💡 Manually fixable by editor suggestions.
💭 Requires type information.

Rules

Name                                     Description💼🔧💡💭
fixer-returnrequire fixer functions to return a fix
meta-property-orderingenforce the order of meta properties🔧
no-deprecated-context-methodsdisallow usage of deprecated methods on rule context objects🔧
no-deprecated-report-apidisallow the version of context.report() with multiple arguments🔧
no-incomplete-meta-schemarequire explicit policy choices in rule options schemas
no-incorrect-meta-schemadisallow rule options schema constructs that ESLint ignores
no-matching-violation-suggest-message-idsrequire suggestions to have different messageId than their parent report
no-meta-replaced-bydisallow using the meta.replacedBy rule property
no-meta-schema-defaultdisallow rules meta.schema properties to include defaults
no-missing-message-idsdisallow messageIds that are missing from meta.messages
no-missing-placeholdersdisallow missing placeholders in rule report messages
no-property-in-nodedisallow using in to narrow node types instead of looking at properties💭
no-unused-message-idsdisallow unused messageIds in meta.messages
no-unused-placeholdersdisallow unused placeholders in rule report messages
no-useless-token-rangedisallow unnecessary calls to sourceCode.getFirstToken() and sourceCode.getLastToken()🔧
prefer-message-idsrequire using messageId instead of message or desc to report rule violations
prefer-object-ruledisallow function-style rules🔧
prefer-placeholdersrequire using placeholders for dynamic report messages
prefer-replace-textrequire using replaceText() instead of replaceTextRange()
report-message-formatenforce a consistent format for rule report messages
require-meta-default-optionsrequire only rules with options to implement a meta.defaultOptions property🔧
require-meta-docs-descriptionrequire rules to implement a meta.docs.description property with the correct format
require-meta-docs-recommendedrequire rules to implement a meta.docs.recommended property💡
require-meta-docs-urlrequire rules to implement a meta.docs.url property🔧
require-meta-fixablerequire rules to implement a meta.fixable property
require-meta-has-suggestionsrequire suggestable rules to implement a meta.hasSuggestions property🔧
require-meta-languagesrequire rules to implement a meta.languages property
require-meta-schemarequire rules to implement a meta.schema property💡
require-meta-schema-descriptionrequire rules meta.schema properties to include descriptions
require-meta-typerequire rules to implement a meta.type property

Tests

Name                        Description💼🔧💡💭
consistent-outputenforce consistent use of output assertions in rule tests
no-identical-testsdisallow identical tests🔧
no-only-testsdisallow the test case property only💡
prefer-output-nulldisallow invalid RuleTester test cases where the output matches the code🔧
require-test-case-namerequire test cases to have a name property under certain conditions
require-test-error-positionsrequires the position of errors to be explicitly stated for all expected errors
test-case-property-orderingrequire the properties of a test case to be placed in a consistent order🔧
test-case-shorthand-stringsenforce consistent usage of shorthand strings for test cases with no options🔧
unique-test-case-namesenforce that all test cases with names have unique names

Presets

NameDescription
recommendedenables all recommended rules in this plugin
rules-recommendedenables all recommended rules that are aimed at linting ESLint rule files
tests-recommendedenables all recommended rules that are aimed at linting ESLint test files
allenables all rules in this plugin, excluding those requiring type information
all-type-checkedenables all rules in this plugin, including those requiring type information
rulesenables all rules that are aimed at linting ESLint rule files
testsenables all rules that are aimed at linting ESLint test files

Semantic versioning policy

The list of recommended rules will only change in a major release of this plugin. However, new non-recommended rules might be added in a minor release of this plugin. Therefore, using the all, rules, and tests presets is not recommended for production use, because the addition of new rules in a minor release could break your build.

Preset usage

Example of applying the recommended config to all files.

// eslint.config.js
import eslintPlugin from 'eslint-plugin-eslint-plugin';

export default [eslintPlugin.configs.recommended];

Or to apply linting only to the appropriate rule or test files:

// eslint.config.js
import eslintPlugin from 'eslint-plugin-eslint-plugin';

export default [
  {
    files: ['lib/rules/*.{js,ts}'],
    ...eslintPlugin.configs['rules-recommended'],
  },
  {
    files: ['tests/lib/rules/*.{js,ts}'],
    ...eslintPlugin.configs['tests-recommended'],
  },
];

Settings

You may set the following settings in your eslint.config.js

ruleTesterConstructors

The different names allowed for the constructors of the RuleTester. Can contain both string and RegExp. A string verifies a full match, while a RegExp uses RegExp.prototype.test().

This settings defaults to ['RuleTester'].

// eslint.config.js
export default [
  {
    settings: {
      'eslint-plugin': {
        ruleTesterConstructors: [/RuleTester$/, /^createRuleTester/],
      },
    },
  },
];

Contributors

(top 30 of 35)

aladdin-add

142 commits

bmish

135 commits

not-an-aardvark

77 commits

renovate[bot]

44 commits

Languages

TypeScript

99.3%