Warns about deprecated or removed ESLint rules in ESLint config.
This small plugin was created for the purpose of finding whether our team of developers is using deprecated rules for the currently installed version of ESLint. Meaning, if you are using an older version of ESLint and a rule got deprecated in newer versions, then you won't get any warnings.
This plugin's rules work both for ESLint core rules, as well as rules provided by 3rd-party plugins.
You'll first need to install ESLint:
npm i eslint --save-dev
Next, install eslint-plugin-deprecated-rules
:
npm install eslint-plugin-deprecated-rules --save-dev
There are 2 main ways to use this package:
- Add plugin and its rules manually
- Extend
recommended
config provided by the plugin
Add deprecated-rules
to the plugins section of your .eslintrc
configuration file. You can omit the eslint-plugin-
prefix:
{
"plugins": [
"deprecated-rules"
]
}
Then configure the rules you want to use under the rules section.
{
"rules": {
"deprecated-rules/no-deprecated-rules": "warn"
}
}
{
"extends": [
"plugin:deprecated-rules/recommended"
]
}
✅ Set in the recommended
configuration.
Name | Description | |
---|---|---|
no-deprecated-rules | Warns for ESLint deprecated rules | ✅ |
- eslint-find-rules - used to parse ESLint configs and extract rules
We use SemVer for versioning. For the versions available, see the tags on this repository.
This project is licensed under the MIT License - see the LICENSE file for details.