eslint-plugin-require-duplicate
v1.1.0
Published
ESLint plugin that spots duplicate imports using the require("...") syntax.
Downloads
950
Maintainers
Readme
eslint-plugin-require-duplicate
ESLint plugin that spots duplicate imports using the require("...") syntax.
Installation
You'll first need to install ESLint:
$ npm i eslint --save-dev
Next, install eslint-plugin-require-duplicate
:
$ npm install eslint-plugin-require-duplicate --save-dev
Usage
Add require-duplicate
to the plugins section of your .eslintrc
configuration file. You can omit the eslint-plugin-
prefix:
{
"plugins": [
"require-duplicate"
]
}
Then configure the rules you want to use under the rules section.
{
"rules": {
"require-duplicate/no-duplicate": 2
}
}