Update .eslintrc.js to prevent no-shadow false positives (#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.

https://github.com/typescript-eslint/typescript-eslint/issues/2483
This commit is contained in:
Fatherdotter
2022-01-13 01:30:54 -05:00
committed by GitHub
parent 39ac40c24a
commit abc36e1159

View File

@@ -41,6 +41,12 @@ module.exports = {
], ],
"@typescript-eslint/no-explicit-any": "off", "@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-parameter-properties": "off", "@typescript-eslint/no-parameter-properties": "off",
"@typescript-eslint/no-shadow": [
"error",
{
hoist: "all"
}
],
"@typescript-eslint/no-unused-expressions": "error", "@typescript-eslint/no-unused-expressions": "error",
"@typescript-eslint/no-use-before-define": ["error", { functions: false }], "@typescript-eslint/no-use-before-define": ["error", { functions: false }],
"@typescript-eslint/prefer-for-of": "error", "@typescript-eslint/prefer-for-of": "error",
@@ -67,12 +73,7 @@ module.exports = {
"no-invalid-this": "off", "no-invalid-this": "off",
"no-multiple-empty-lines": "off", "no-multiple-empty-lines": "off",
"no-new-wrappers": "error", "no-new-wrappers": "error",
"no-shadow": [ "no-shadow": "off",
"error",
{
hoist: "all"
}
],
"no-throw-literal": "error", "no-throw-literal": "error",
"no-trailing-spaces": "off", "no-trailing-spaces": "off",
"no-undef-init": "error", "no-undef-init": "error",