You'll first need to install ESLint:
$ npm i eslint --save-dev
Next, install eslint-plugin-bestpractices
:
$ npm install https://github.com/skye2k2/eslint-plugin-bestpractices.git --save-dev
Note: If you installed ESLint globally (using the -g
flag) then you must also install eslint-plugin-bestpractices
globally.
Add bestpractices
to the plugins section of your .eslintrc
configuration file. You can omit the eslint-plugin-
prefix:
{
"plugins": [
"bestpractices"
]
}
Then configure the rules you want to use under the rules section.
{
"rules": {
"bestpractices/no-eslint-disable": "warn"
}
}
- bestpractices/no-eslint-disable: Warn when linting has been disabled inline WITHOUT an accompanying -- explanation.
MIT