eslint-plugin-mpirik

4.0.1 • Public • Published

eslint-plugin-mpirik

ESLint rules and configuration that extends airbnb's configuration

catch-name: [2, 'ex']

Enforce the name of the exception variable created in a catch block.

Allow multiple parameter names:

  "mpirik/catch-name": [2, '^(ex|exception)']

mochajs-no-exclusive-tests: 2

Prevents exclusive mochajs tests

no-callback-in-generator: 2

Prevents callback usage inside of a generator function

promise-shorthand: 2

Require promise shorthand where possible

Usage

  • npm install --save-dev eslint-plugin-mpirik eslint
  • Add plugins section and specify eslint-plugin-mpirik as a plugin:
{
  "plugins": [
    "mpirik"
  ]
}
  • Use recommended configuration for default rules or specify rules explicitly
{
  "plugins": [
    "mpirik"
  ],
  "extends": ["plugin:mpirik/recommended"]
}

or

  "rules": {
    "mpirik/catch-name": "error"
  }

Useful links

I found these links useful while writing rules:

Package Sidebar

Install

npm i eslint-plugin-mpirik

Weekly Downloads

0

Version

4.0.1

License

MIT

Unpacked Size

13 kB

Total Files

7

Last publish

Collaborators

  • jgeurts