Socket
Socket
Sign inDemoInstall

eslint-plugin-eslint-plugin

Package Overview
Dependencies
Maintainers
5
Versions
74
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-eslint-plugin - npm Package Compare versions

Comparing version 5.2.1 to 5.3.0

configs/all-type-checked.js

3

lib/index.js

@@ -18,3 +18,4 @@ /**

const configFilters = {
all: () => true,
all: (rule) => !rule.meta.docs.requiresTypeChecking,
'all-type-checked': () => true,
recommended: (rule) => rule.meta.docs.recommended,

@@ -21,0 +22,0 @@ rules: (rule) => rule.meta.docs.category === 'Rules',

{
"name": "eslint-plugin-eslint-plugin",
"version": "5.2.1",
"version": "5.3.0",
"description": "An ESLint plugin for linting ESLint plugins",

@@ -58,3 +58,6 @@ "author": "Teddy Katz",

"@release-it/conventional-changelog": "^4.3.0",
"@typescript-eslint/parser": "^5.36.2",
"@types/eslint": "^8.56.2",
"@types/estree": "^1.0.5",
"@typescript-eslint/parser": "^5.62.0",
"@typescript-eslint/utils": "^5.62.0",
"chai": "^4.3.6",

@@ -78,10 +81,10 @@ "dirty-chai": "^2.0.1",

"lodash": "^4.17.21",
"markdownlint-cli": "^0.36.0",
"markdownlint-cli": "^0.39.0",
"mocha": "^10.0.0",
"npm-package-json-lint": "^7.0.0",
"npm-run-all": "^4.1.5",
"npm-run-all2": "^5.0.0",
"nyc": "^15.1.0",
"prettier": "^2.7.1",
"release-it": "^14.14.3",
"typescript": "^5.0.4"
"typescript": "5.1.3"
},

@@ -88,0 +91,0 @@ "peerDependencies": {

@@ -1,2 +0,2 @@

# eslint-plugin-eslint-plugin ![CI](https://github.com/eslint-community/eslint-plugin-eslint-plugin/workflows/CI/badge.svg) [![NPM version](https://img.shields.io/npm/v/eslint-plugin-eslint-plugin.svg?style=flat)](https://npmjs.org/package/eslint-plugin-eslint-plugin) [![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg)](https://conventionalcommits.org)
# eslint-plugin-eslint-plugin ![CI](https://github.com/eslint-community/eslint-plugin-eslint-plugin/workflows/CI/badge.svg) [![NPM version](https://img.shields.io/npm/v/eslint-plugin-eslint-plugin.svg?style=flat)](https://npmjs.org/package/eslint-plugin-eslint-plugin) [![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg)](https://conventionalcommits.org) <!-- omit from toc -->

@@ -6,9 +6,14 @@ An ESLint plugin for linting ESLint plugins. Rules written in CJS, ESM, and TypeScript are all supported.

<!-- vscode-markdown-toc -->
* [Installation](#Installation)
* [Usage](#Usage)
* [Rules](#Rules)
* [Presets](#Presets)
* [Semantic versioning policy](#Semanticversioningpolicy)
* [Preset usage](#Presetusage)
- [Installation](#installation)
- [Usage](#usage)
- [**.eslintrc.json**](#eslintrcjson)
- [`eslint.config.js` (requires eslint\>=v8.23.0)](#eslintconfigjs-requires-eslintv8230)
- [Rules](#rules)
- [Rules](#rules-1)
- [Tests](#tests)
- [Presets](#presets)
- [Semantic versioning policy](#semantic-versioning-policy)
- [Preset usage](#preset-usage)
<!-- vscode-markdown-toc-config

@@ -38,5 +43,5 @@ numbering=false

* Sets `sourceType` to `script` for CJS plugins (most users) (use `module` for ESM/TypeScript)
* Enables the `recommended` configuration
* Enables an optional/non-recommended rule
- Sets `sourceType` to `script` for CJS plugins (most users) (use `module` for ESM/TypeScript)
- Enables the `recommended` configuration
- Enables an optional/non-recommended rule

@@ -47,11 +52,9 @@ ### <a name='eslintrc'></a>**[.eslintrc.json](https://eslint.org/docs/latest/use/configure/configuration-files)**

{
"parserOptions": {
"sourceType": "script"
},
"extends": [
"plugin:eslint-plugin/recommended"
],
"rules": {
"eslint-plugin/require-meta-docs-description": "error"
}
"parserOptions": {
"sourceType": "script"
},
"extends": ["plugin:eslint-plugin/recommended"],
"rules": {
"eslint-plugin/require-meta-docs-description": "error"
}
}

@@ -63,11 +66,11 @@ ```

```js
const eslintPluginRecommended = require("eslint-plugin-eslint-plugin/configs/recommended");
const eslintPluginRecommended = require('eslint-plugin-eslint-plugin/configs/recommended');
module.exports = [
eslintPluginRecommended,
{
languageOptions: {sourceType: "commonjs"},
rules: {
"eslint-plugin/require-meta-docs-description": "error",
},
eslintPluginRecommended,
{
languageOptions: { sourceType: 'commonjs' },
rules: {
'eslint-plugin/require-meta-docs-description': 'error',
},
},
];

@@ -83,39 +86,41 @@ ```

🔧 Automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/user-guide/command-line-interface#--fix).\
💡 Manually fixable by [editor suggestions](https://eslint.org/docs/developer-guide/working-with-rules#providing-suggestions).
💡 Manually fixable by [editor suggestions](https://eslint.org/docs/developer-guide/working-with-rules#providing-suggestions).\
💭 Requires type information.
### Rules
| Name                          | Description | 💼 | 🔧 | 💡 |
| :--------------------------------------------------------------------------- | :----------------------------------------------------------------------------------------- | :- | :- | :- |
| [fixer-return](docs/rules/fixer-return.md) | require fixer functions to return a fix | ✅ | | |
| [meta-property-ordering](docs/rules/meta-property-ordering.md) | enforce the order of meta properties | | 🔧 | |
| [no-deprecated-context-methods](docs/rules/no-deprecated-context-methods.md) | disallow usage of deprecated methods on rule context objects | ✅ | 🔧 | |
| [no-deprecated-report-api](docs/rules/no-deprecated-report-api.md) | disallow the version of `context.report()` with multiple arguments | ✅ | 🔧 | |
| [no-missing-message-ids](docs/rules/no-missing-message-ids.md) | disallow `messageId`s that are missing from `meta.messages` | ✅ | | |
| [no-missing-placeholders](docs/rules/no-missing-placeholders.md) | disallow missing placeholders in rule report messages | ✅ | | |
| [no-unused-message-ids](docs/rules/no-unused-message-ids.md) | disallow unused `messageId`s in `meta.messages` | ✅ | | |
| [no-unused-placeholders](docs/rules/no-unused-placeholders.md) | disallow unused placeholders in rule report messages | ✅ | | |
| [no-useless-token-range](docs/rules/no-useless-token-range.md) | disallow unnecessary calls to `sourceCode.getFirstToken()` and `sourceCode.getLastToken()` | ✅ | 🔧 | |
| [prefer-message-ids](docs/rules/prefer-message-ids.md) | require using `messageId` instead of `message` or `desc` to report rule violations | ✅ | | |
| [prefer-object-rule](docs/rules/prefer-object-rule.md) | disallow function-style rules | ✅ | 🔧 | |
| [prefer-placeholders](docs/rules/prefer-placeholders.md) | require using placeholders for dynamic report messages | | | |
| [prefer-replace-text](docs/rules/prefer-replace-text.md) | require using `replaceText()` instead of `replaceTextRange()` | | | |
| [report-message-format](docs/rules/report-message-format.md) | enforce a consistent format for rule report messages | | | |
| [require-meta-docs-description](docs/rules/require-meta-docs-description.md) | require rules to implement a `meta.docs.description` property with the correct format | | | |
| [require-meta-docs-url](docs/rules/require-meta-docs-url.md) | require rules to implement a `meta.docs.url` property | | 🔧 | |
| [require-meta-fixable](docs/rules/require-meta-fixable.md) | require rules to implement a `meta.fixable` property | ✅ | | |
| [require-meta-has-suggestions](docs/rules/require-meta-has-suggestions.md) | require suggestable rules to implement a `meta.hasSuggestions` property | ✅ | 🔧 | |
| [require-meta-schema](docs/rules/require-meta-schema.md) | require rules to implement a `meta.schema` property | ✅ | | 💡 |
| [require-meta-type](docs/rules/require-meta-type.md) | require rules to implement a `meta.type` property | ✅ | | |
| Name                          | Description | 💼 | 🔧 | 💡 | 💭 |
| :--------------------------------------------------------------------------- | :----------------------------------------------------------------------------------------- | :-- | :-- | :-- | :-- |
| [fixer-return](docs/rules/fixer-return.md) | require fixer functions to return a fix | ✅ | | | |
| [meta-property-ordering](docs/rules/meta-property-ordering.md) | enforce the order of meta properties | | 🔧 | | |
| [no-deprecated-context-methods](docs/rules/no-deprecated-context-methods.md) | disallow usage of deprecated methods on rule context objects | ✅ | 🔧 | | |
| [no-deprecated-report-api](docs/rules/no-deprecated-report-api.md) | disallow the version of `context.report()` with multiple arguments | ✅ | 🔧 | | |
| [no-missing-message-ids](docs/rules/no-missing-message-ids.md) | disallow `messageId`s that are missing from `meta.messages` | ✅ | | | |
| [no-missing-placeholders](docs/rules/no-missing-placeholders.md) | disallow missing placeholders in rule report messages | ✅ | | | |
| [no-property-in-node](docs/rules/no-property-in-node.md) | disallow using `in` to narrow node types instead of looking at properties | | | | 💭 |
| [no-unused-message-ids](docs/rules/no-unused-message-ids.md) | disallow unused `messageId`s in `meta.messages` | ✅ | | | |
| [no-unused-placeholders](docs/rules/no-unused-placeholders.md) | disallow unused placeholders in rule report messages | ✅ | | | |
| [no-useless-token-range](docs/rules/no-useless-token-range.md) | disallow unnecessary calls to `sourceCode.getFirstToken()` and `sourceCode.getLastToken()` | ✅ | 🔧 | | |
| [prefer-message-ids](docs/rules/prefer-message-ids.md) | require using `messageId` instead of `message` or `desc` to report rule violations | ✅ | | | |
| [prefer-object-rule](docs/rules/prefer-object-rule.md) | disallow function-style rules | ✅ | 🔧 | | |
| [prefer-placeholders](docs/rules/prefer-placeholders.md) | require using placeholders for dynamic report messages | | | | |
| [prefer-replace-text](docs/rules/prefer-replace-text.md) | require using `replaceText()` instead of `replaceTextRange()` | | | | |
| [report-message-format](docs/rules/report-message-format.md) | enforce a consistent format for rule report messages | | | | |
| [require-meta-docs-description](docs/rules/require-meta-docs-description.md) | require rules to implement a `meta.docs.description` property with the correct format | | | | |
| [require-meta-docs-url](docs/rules/require-meta-docs-url.md) | require rules to implement a `meta.docs.url` property | | 🔧 | | |
| [require-meta-fixable](docs/rules/require-meta-fixable.md) | require rules to implement a `meta.fixable` property | ✅ | | | |
| [require-meta-has-suggestions](docs/rules/require-meta-has-suggestions.md) | require suggestable rules to implement a `meta.hasSuggestions` property | ✅ | 🔧 | | |
| [require-meta-schema](docs/rules/require-meta-schema.md) | require rules to implement a `meta.schema` property | ✅ | | 💡 | |
| [require-meta-type](docs/rules/require-meta-type.md) | require rules to implement a `meta.type` property | ✅ | | | |
### Tests
| Name                        | Description | 💼 | 🔧 | 💡 |
| :----------------------------------------------------------------------- | :--------------------------------------------------------------------------- | :- | :- | :- |
| [consistent-output](docs/rules/consistent-output.md) | enforce consistent use of `output` assertions in rule tests | ✅ | | |
| [no-identical-tests](docs/rules/no-identical-tests.md) | disallow identical tests | ✅ | 🔧 | |
| [no-only-tests](docs/rules/no-only-tests.md) | disallow the test case property `only` | ✅ | | 💡 |
| [prefer-output-null](docs/rules/prefer-output-null.md) | disallow invalid RuleTester test cases where the `output` matches the `code` | ✅ | 🔧 | |
| [test-case-property-ordering](docs/rules/test-case-property-ordering.md) | require the properties of a test case to be placed in a consistent order | | 🔧 | |
| [test-case-shorthand-strings](docs/rules/test-case-shorthand-strings.md) | enforce consistent usage of shorthand strings for test cases with no options | | 🔧 | |
| Name                        | Description | 💼 | 🔧 | 💡 | 💭 |
| :----------------------------------------------------------------------- | :--------------------------------------------------------------------------- | :-- | :-- | :-- | :-- |
| [consistent-output](docs/rules/consistent-output.md) | enforce consistent use of `output` assertions in rule tests | ✅ | | | |
| [no-identical-tests](docs/rules/no-identical-tests.md) | disallow identical tests | ✅ | 🔧 | | |
| [no-only-tests](docs/rules/no-only-tests.md) | disallow the test case property `only` | ✅ | | 💡 | |
| [prefer-output-null](docs/rules/prefer-output-null.md) | disallow invalid RuleTester test cases where the `output` matches the `code` | ✅ | 🔧 | | |
| [test-case-property-ordering](docs/rules/test-case-property-ordering.md) | require the properties of a test case to be placed in a consistent order | | 🔧 | | |
| [test-case-shorthand-strings](docs/rules/test-case-shorthand-strings.md) | enforce consistent usage of shorthand strings for test cases with no options | | 🔧 | | |

@@ -126,10 +131,11 @@ <!-- end auto-generated rules list -->

| | Name | Description |
|:--|:--------------------|:--------------------------------------------------------------------------|
| ✅ | `recommended` | enables all recommended rules in this plugin |
| | `rules-recommended` | enables all recommended rules that are aimed at linting ESLint rule files |
| | `tests-recommended` | enables all recommended rules that are aimed at linting ESLint test files |
| | `all` | enables all rules in this plugin |
| | `rules` | enables all rules that are aimed at linting ESLint rule files |
| | `tests` | enables all rules that are aimed at linting ESLint test files |
| | Name | Description |
| :-- | :------------------ | :--------------------------------------------------------------------------- |
| ✅ | `recommended` | enables all recommended rules in this plugin |
| | `rules-recommended` | enables all recommended rules that are aimed at linting ESLint rule files |
| | `tests-recommended` | enables all recommended rules that are aimed at linting ESLint test files |
| | `all` | enables all rules in this plugin, including those requiring type information |
| | `all-type-checked` | enables all rules in this plugin, including those requiring type information |
| | `rules` | enables all rules that are aimed at linting ESLint rule files |
| | `tests` | enables all rules that are aimed at linting ESLint test files |

@@ -146,5 +152,3 @@ ### <a name='Semanticversioningpolicy'></a>Semantic versioning policy

{
"extends": [
"plugin:eslint-plugin/recommended"
]
"extends": ["plugin:eslint-plugin/recommended"]
}

@@ -157,13 +161,13 @@ ```

{
"overrides": [
{
"files": ["lib/rules/*.{js,ts}"],
"extends": ["plugin:eslint-plugin/rules-recommended"]
},
{
"files": ["tests/lib/rules/*.{js,ts}"],
"extends": ["plugin:eslint-plugin/tests-recommended"]
},
]
"overrides": [
{
"files": ["lib/rules/*.{js,ts}"],
"extends": ["plugin:eslint-plugin/rules-recommended"]
},
{
"files": ["tests/lib/rules/*.{js,ts}"],
"extends": ["plugin:eslint-plugin/tests-recommended"]
}
]
}
```
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc