eslint-plugin-require-duplicate

1.1.0 • Public • Published

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
    }
}

Supported Rules

Package Sidebar

Install

npm i eslint-plugin-require-duplicate

Weekly Downloads

178

Version

1.1.0

License

MIT

Unpacked Size

12.1 kB

Total Files

13

Last publish

Collaborators

  • lukapg