Skip to content

Commit abc36e1

Browse files
authored
Update .eslintrc.js to prevent no-shadow false positives (screepers#162)
* Update .eslintrc.js to prevent false positives Utilizing eslint "no-shadow" rule yields false positives for enums (claims that they were declared in an upper scope, error "no-shadow" Utilize @typescript-eslint/no-shadow corrects this issue. typescript-eslint/typescript-eslint#2483
1 parent 39ac40c commit abc36e1

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

.eslintrc.js

+7-6
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,12 @@ module.exports = {
4141
],
4242
"@typescript-eslint/no-explicit-any": "off",
4343
"@typescript-eslint/no-parameter-properties": "off",
44+
"@typescript-eslint/no-shadow": [
45+
"error",
46+
{
47+
hoist: "all"
48+
}
49+
],
4450
"@typescript-eslint/no-unused-expressions": "error",
4551
"@typescript-eslint/no-use-before-define": ["error", { functions: false }],
4652
"@typescript-eslint/prefer-for-of": "error",
@@ -67,12 +73,7 @@ module.exports = {
6773
"no-invalid-this": "off",
6874
"no-multiple-empty-lines": "off",
6975
"no-new-wrappers": "error",
70-
"no-shadow": [
71-
"error",
72-
{
73-
hoist: "all"
74-
}
75-
],
76+
"no-shadow": "off",
7677
"no-throw-literal": "error",
7778
"no-trailing-spaces": "off",
7879
"no-undef-init": "error",

0 commit comments

Comments
 (0)