Skip to content

Commit 09248c2

Browse files
authored
Merge pull request #74 from feross/v10
Rule changes for standard v10
2 parents 672d7b8 + e5cf63a commit 09248c2

File tree

3 files changed

+35
-13
lines changed

3 files changed

+35
-13
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ official ESLint website.
3232
To use the JavaScript Standard Style shareable config, first run this:
3333

3434
```bash
35-
npm install --save-dev eslint-config-standard eslint-plugin-standard eslint-plugin-promise
35+
npm install --save-dev eslint-config-standard eslint-plugin-standard eslint-plugin-promise eslint-plugin-import
3636
```
3737

3838
Then, add this to your .eslintrc file:

eslintrc.json

Lines changed: 26 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,10 @@
1414
},
1515

1616
"plugins": [
17-
"standard",
18-
"promise"
17+
"import",
18+
"node",
19+
"promise",
20+
"standard"
1921
],
2022

2123
"globals": {
@@ -30,7 +32,13 @@
3032
"block-spacing": ["error", "always"],
3133
"brace-style": ["error", "1tbs", { "allowSingleLine": true }],
3234
"camelcase": ["error", { "properties": "never" }],
33-
"comma-dangle": ["error", "never"],
35+
"comma-dangle": ["error", {
36+
"arrays": "never",
37+
"objects": "never",
38+
"imports": "never",
39+
"exports": "never",
40+
"functions": "never"
41+
}],
3442
"comma-spacing": ["error", { "before": false, "after": true }],
3543
"comma-style": ["error", "last"],
3644
"constructor-super": "error",
@@ -59,7 +67,6 @@
5967
"no-dupe-class-members": "error",
6068
"no-dupe-keys": "error",
6169
"no-duplicate-case": "error",
62-
"no-duplicate-imports": "error",
6370
"no-empty-character-class": "error",
6471
"no-empty-pattern": "error",
6572
"no-eval": "error",
@@ -108,6 +115,7 @@
108115
"no-redeclare": "error",
109116
"no-regex-spaces": "error",
110117
"no-return-assign": ["error", "except-parens"],
118+
"no-return-await": "error",
111119
"no-self-assign": "error",
112120
"no-self-compare": "error",
113121
"no-sequences": "error",
@@ -127,7 +135,7 @@
127135
"no-unsafe-finally": "error",
128136
"no-unsafe-negation": "error",
129137
"no-unused-expressions": ["error", { "allowShortCircuit": true, "allowTernary": true }],
130-
"no-unused-vars": ["error", { "vars": "all", "args": "none" }],
138+
"no-unused-vars": ["error", { "vars": "all", "args": "none", "ignoreRestSiblings": true }],
131139
"no-use-before-define": ["error", { "functions": false, "classes": false, "variables": false }],
132140
"no-useless-call": "error",
133141
"no-useless-computed-key": "error",
@@ -165,10 +173,20 @@
165173
"yield-star-spacing": ["error", "both"],
166174
"yoda": ["error", "never"],
167175

168-
"standard/object-curly-even-spacing": ["error", "either"],
176+
"import/export": "error",
177+
"import/first": "error",
178+
"import/no-absolute-path": "error",
179+
"import/no-duplicates": "error",
180+
"import/no-webpack-loader-syntax": "error",
181+
182+
"node/no-deprecated-api": "error",
183+
"node/process-exit-as-throw": "error",
184+
185+
"promise/param-names": "error",
186+
169187
"standard/array-bracket-even-spacing": ["error", "either"],
170188
"standard/computed-property-even-spacing": ["error", "even"],
171-
172-
"promise/param-names": "error"
189+
"standard/no-callback-literal": "error",
190+
"standard/object-curly-even-spacing": ["error", "either"]
173191
}
174192
}

package.json

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,10 @@
1212
},
1313
"devDependencies": {
1414
"eslint": "^3.8.1",
15-
"eslint-plugin-promise": "^3.3.0",
16-
"eslint-plugin-standard": "^2.0.0",
15+
"eslint-plugin-import": "^2.2.0",
16+
"eslint-plugin-node": "^4.1.0",
17+
"eslint-plugin-promise": "^3.5.0",
18+
"eslint-plugin-standard": "^2.0.1",
1719
"tape": "^4.6.0"
1820
},
1921
"homepage": "https://github.com/feross/eslint-config-standard",
@@ -47,8 +49,10 @@
4749
"main": "index.js",
4850
"peerDependencies": {
4951
"eslint": ">=3.8.1",
50-
"eslint-plugin-promise": ">=3.3.0",
51-
"eslint-plugin-standard": ">=2.0.0"
52+
"eslint-plugin-import": ">=2.2.0",
53+
"eslint-plugin-node": ">=4.1.0",
54+
"eslint-plugin-promise": ">=3.5.0",
55+
"eslint-plugin-standard": ">=2.0.1"
5256
},
5357
"repository": {
5458
"type": "git",

0 commit comments

Comments
 (0)