Skip to content

Commit

Permalink
Update .eslintrc.js to prevent no-shadow false positives (#162)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
Fatherdotter committed Jan 13, 2022
1 parent 39ac40c commit abc36e1
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,12 @@ module.exports = {
],
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-parameter-properties": "off",
"@typescript-eslint/no-shadow": [
"error",
{
hoist: "all"
}
],
"@typescript-eslint/no-unused-expressions": "error",
"@typescript-eslint/no-use-before-define": ["error", { functions: false }],
"@typescript-eslint/prefer-for-of": "error",
Expand All @@ -67,12 +73,7 @@ module.exports = {
"no-invalid-this": "off",
"no-multiple-empty-lines": "off",
"no-new-wrappers": "error",
"no-shadow": [
"error",
{
hoist: "all"
}
],
"no-shadow": "off",
"no-throw-literal": "error",
"no-trailing-spaces": "off",
"no-undef-init": "error",
Expand Down

0 comments on commit abc36e1

Please sign in to comment.