Skip to content

Commit b67d61a

Browse files
authored
Merge pull request webpack#4755 from aretecode/lint-update
update node linting
2 parents a2ec4c8 + 5c423d6 commit b67d61a

File tree

1 file changed

+29
-13
lines changed

1 file changed

+29
-13
lines changed

.eslintrc renamed to .eslintrc.js

Lines changed: 29 additions & 13 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",
@@ -26,7 +28,7 @@
2628
"space-in-parens": "error",
2729
"no-trailing-spaces": "error",
2830
"no-use-before-define": "off",
29-
"no-unused-vars": ["error", {"args": "none"}],
31+
"no-unused-vars": ["error", { "args": "none" }],
3032
"key-spacing": "error",
3133
"space-infix-ops": "error",
3234
"no-unsafe-negation": "error",
@@ -37,17 +39,31 @@
3739
"keyword-spacing": ["error", {
3840
"after": false,
3941
"overrides": {
40-
"try": {"after": true},
41-
"else": {"after": true},
42-
"throw": {"after": true},
43-
"case": {"after": true},
44-
"return": {"after": true},
45-
"finally": {"after": true},
46-
"do": {"after": true}
42+
"const": { "after": true },
43+
"try": { "after": true },
44+
"else": { "after": true },
45+
"throw": { "after": true },
46+
"case": { "after": true },
47+
"return": { "after": true },
48+
"finally": { "after": true },
49+
"do": { "after": true }
4750
}
4851
}],
4952
"no-console": "off",
50-
"valid-jsdoc": "error"
53+
"valid-jsdoc": "error",
54+
"node/no-unsupported-features": ["error", { version: 4 }],
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
}
52-
}
53-
69+
};

0 commit comments

Comments
 (0)