Giter VIP home page Giter VIP logo

eslint-plugin-eslint-plugin's Introduction

eslint-plugin-eslint-plugin Build Status

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

eslint-plugin-eslint-plugin's People

Contributors

aladdin-add avatar esrefdurna avatar mysticatea avatar not-an-aardvark avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.