From abc36e115903068908b65c48f1baa2b593c92acd Mon Sep 17 00:00:00 2001 From: Fatherdotter <81642592+Fatherdotter@users.noreply.github.com> Date: Thu, 13 Jan 2022 01:30:54 -0500 Subject: [PATCH] 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 --- .eslintrc.js | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 8d5e6f4..ce415a1 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -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", @@ -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",