Not allow parameter named e, confused with event and error
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.circleci
test
.eslintrc
.gitignore
LICENSE
README.md
index.js
package.json
rule.js
yarn.lock

README.md

eslint-plugin-no-parameter-e

Not allow parameter named e, confused with event and error

Why

Developers usually want to use short, simple and meaningful names. Sometimes they use short form, event shorten to only 1 character. And in somecases, one character name still readable. But there are two common variable: event and error. Both starts with letter e. If they all use short form. Developers might confused what it is.

This plugin is to prevent any function parameter use the name e. Which will confuse developers.

Installation

Install local plugin:

$ npm install eslint-plugin-no-parameter-e --save-dev

If you use global eslint, you need install this plugin global too.

Configuration

Add plugin and rule:

{
  "plugins": [
    "no-parameter-e"
  ],

  "rules": {
    "no-parameter-e": 2
  }
}