Skip to content

Commit cf66618

Browse files
committed
👕 update node linting
update linting for destructuring and latest node uses .js rather than .eslintrc file pulls in rules from https://github.com/webpack/webpack-cli/pull/46/files#diff-df39304d828831c44a2b9f38cd45289cR40 adds spacing for this <img width="495" alt="screen shot 2017-04-19 at 7 03 16 pm" src="https://cloud.githubusercontent.com/assets/4022631/25210014/eabff164-2532-11e7-89a3-837fde6c7101.png">
1 parent 8aa8a7b commit cf66618

File tree

1 file changed

+20
-4
lines changed

1 file changed

+20
-4
lines changed

.eslintrc renamed to .eslintrc.js

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1-
{
1+
module.exports = {
22
"root": true,
33
"plugins": ["node"],
44
"extends": ["eslint:recommended", "plugin:node/recommended"],
55
"env": {
6-
"node": true
6+
"node": true,
7+
"es6": true,
78
},
9+
"parserOptions": {"ecmaVersion": 2017},
810
"rules": {
911
"quotes": ["error", "double"],
1012
"no-undef": "error",
@@ -37,6 +39,7 @@
3739
"keyword-spacing": ["error", {
3840
"after": false,
3941
"overrides": {
42+
"const": {"after": true},
4043
"try": {"after": true},
4144
"else": {"after": true},
4245
"throw": {"after": true},
@@ -47,7 +50,20 @@
4750
}
4851
}],
4952
"no-console": "off",
50-
"valid-jsdoc": "error"
53+
"valid-jsdoc": "error",
54+
"node/no-unsupported-features": ["error", {version: 7}],
55+
"node/no-deprecated-api": "error",
56+
"node/no-missing-import": "error",
57+
"node/no-missing-require": [
58+
"error",
59+
{
60+
"allowModules": [
61+
"webpack"
62+
]
63+
}
64+
],
65+
"node/no-unpublished-bin": "error",
66+
"node/no-unpublished-require": "error",
67+
"node/process-exit-as-throw": "error"
5168
}
5269
}
53-

0 commit comments

Comments
 (0)