eslint-plugin-wrong-name

0.0.5 • Public • Published

eslint-plugin-wrong-name

Any name that match the pattern will be treated as an error.

For example:

const patterns = ["[Dd]ata", "[Ii]tem"]
patterns.map(item => item.toLowerCase()) // item not the best name

Installation

You'll first need to install ESLint:

$ npm i eslint --save-dev

Next, install eslint-plugin-wrong-name:

$ npm install eslint-plugin-wrong-name --save-dev

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

Usage

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

{
  "plugins": ["wrong-name"]
}

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

{
  "rules": {
    "wrong-name/wrong-name": [2, {
      "patterns": [
        "[Dd]ata",
        "[Ii]tem",
        "[Vv]alue"
      ]
    }]
  }
}

Supported Rules

  • Fill in provided rules here

Package Sidebar

Install

npm i eslint-plugin-wrong-name

Weekly Downloads

2

Version

0.0.5

License

ISC

Unpacked Size

5.32 kB

Total Files

6

Last publish

Collaborators

  • andrewbeletskiy