Skip to content

Commit

Permalink
Add eslint-plugin-import for import/no-duplicates rule
Browse files Browse the repository at this point in the history
Fixes: standard/standard#599
Fixes: standard/standard#712

`import/no-duplicates` replaces the core rule `no-duplicate-imports`.
  • Loading branch information
feross committed Mar 2, 2017
1 parent ff259fd commit b174d83
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -32,7 +32,7 @@ official ESLint website.
To use the JavaScript Standard Style shareable config, first run this:

```bash
npm install --save-dev eslint-config-standard eslint-plugin-standard eslint-plugin-promise
npm install --save-dev eslint-config-standard eslint-plugin-standard eslint-plugin-promise eslint-plugin-import
```

Then, add this to your .eslintrc file:
Expand Down
14 changes: 8 additions & 6 deletions eslintrc.json
Expand Up @@ -14,8 +14,9 @@
},

"plugins": [
"standard",
"promise"
"import",
"promise",
"standard"
],

"globals": {
Expand Down Expand Up @@ -65,7 +66,6 @@
"no-dupe-class-members": "error",
"no-dupe-keys": "error",
"no-duplicate-case": "error",
"no-duplicate-imports": "error",
"no-empty-character-class": "error",
"no-empty-pattern": "error",
"no-eval": "error",
Expand Down Expand Up @@ -173,10 +173,12 @@
"yield-star-spacing": ["error", "both"],
"yoda": ["error", "never"],

"import/no-duplicates": "error",

"promise/param-names": "error",

"standard/object-curly-even-spacing": ["error", "either"],
"standard/array-bracket-even-spacing": ["error", "either"],
"standard/computed-property-even-spacing": ["error", "even"],

"promise/param-names": "error"
"standard/computed-property-even-spacing": ["error", "even"]
}
}
2 changes: 2 additions & 0 deletions package.json
Expand Up @@ -12,6 +12,7 @@
},
"devDependencies": {
"eslint": "^3.8.1",
"eslint-plugin-import": "^2.2.0",
"eslint-plugin-promise": "^3.5.0",
"eslint-plugin-standard": "^2.0.1",
"tape": "^4.6.0"
Expand Down Expand Up @@ -47,6 +48,7 @@
"main": "index.js",
"peerDependencies": {
"eslint": ">=3.8.1",
"eslint-plugin-import": ">=2.2.0",
"eslint-plugin-promise": ">=3.5.0",
"eslint-plugin-standard": ">=2.0.1"
},
Expand Down

0 comments on commit b174d83

Please sign in to comment.