eslint-plugin-eslint-plugin
    Overview
    Documentation
    Tutorials
    Insights
    Code
    Dependencies
    Contributors
    Jobs

eslint-plugin-eslint-plugin

An ESLint plugin for linting ESLint plugins

2.1.0  •  Updated 1 years ago  •  by Teddy Katz  •  MIT License

An ESLint plugin for linting ESLint plugins

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

Note: If you installed ESLint globally (using the -g flag) then you must also install eslint-plugin-eslint-plugin globally.

Usage

Add eslint-plugin to the plugins section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix:

{
    "plugins": [
        "eslint-plugin"
    ]
}

Then configure the rules you want to use under the rules section.

{
    "rules": {
        "eslint-plugin/no-deprecated-report-api": "error"
    }
}

Supported Rules

✔️ indicates that a rule is recommended for all users. 🛠 indicates that a rule is fixable.

Name ✔️ 🛠 Description
consistent-output Enforce consistent use of output assertions in rule tests
fixer-return ✔️ Expected fixer function to always return a value.
meta-property-ordering 🛠 Enforces the order of meta properties
no-deprecated-context-methods 🛠 Disallows usage of deprecated methods on rule context objects
no-deprecated-report-api ✔️ 🛠 disallow use of the deprecated context.report() API
no-identical-tests ✔️ 🛠 disallow identical tests
no-missing-placeholders ✔️ Disallow missing placeholders in rule report messages
no-unused-placeholders ✔️ Disallow unused placeholders in rule report messages
no-useless-token-range ✔️ 🛠 Disallow unnecessary calls to sourceCode.getFirstToken and sourceCode.getLastToken
prefer-output-null 🛠 disallows invalid RuleTester test cases with the output the same as the code.
prefer-placeholders disallow template literals as report messages
prefer-replace-text prefer using replaceText instead of replaceTextRange.
report-message-format enforce a consistent format for rule report messages
require-meta-docs-url 🛠 require rules to implement a meta.docs.url property
require-meta-fixable ✔️ require rules to implement a meta.fixable property
require-meta-type require rules to implement a meta.type property
test-case-property-ordering 🛠 Requires the properties of a test case to be placed in a consistent order
test-case-shorthand-strings 🛠 Enforce consistent usage of shorthand strings for test cases with no options

Supported Presets

Presets are enabled by adding a line to the extends list in your config file. For example, to enable the recommended preset, use:

{
    "extends": [
        "plugin:eslint-plugin/recommended"
    ]
}
  • recommended enables all recommended rules from 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.

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, the 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.

Popularity

Weekly Downloads
9.5K
Stars
70

Maintenance

Development

Last ver 1 year ago
Created 3 years ago
Last commit 3 months ago
9 days between commits

Technology

Node version: 12.1.0
93.1K unpacked

Compliance

MIT License
OSI Approved
0 vulnerabilities

Contributors

8 contributors
Teddy Katz
Maintainer, 73 commits, 20 merges, 6 PRs
薛定谔的猫
Maintainer, 38 commits, 30 merges, 37 PRs
Works at Alibaba Inc.
Bryan Mishkin
3 commits, 3 PRs
Works at square
Esref Durna
1 commits, 1 PRs
Works at Esref
Toru Nagashima
1 commits, 1 PRs
Armano
1 commits, 1 PRs

Tags

eslint
eslintplugin
eslint-plugin
Openbase helps developers choose among and use millions of open-source packages, so they can build amazing products faster.
FacebookTwitterLinkedIn
© 2020 Devstore, Inc.