From 3eeb899e6526d8c3f00ad592f2eea317ddecc61c Mon Sep 17 00:00:00 2001 From: Naz Date: Tue, 27 Oct 2020 11:27:37 +1300 Subject: [PATCH] Enabled error for "no-shadow" eslint rule refs 635580f291bd826c9119049ad968cb7702477ba7 - Changed `no-shadow` eslint rule from `warn` to `error` so we don't re-introduce shadowed variables in the future. Should be removed once this change is introduced in a base plugin - Referenced commit is a chain of commits which fixed the warning which this rule was producing previously --- .eslintrc.json | 2 ++ test/.eslintrc.json | 3 +++ 2 files changed, 5 insertions(+) diff --git a/.eslintrc.json b/.eslintrc.json index d02a0310a7..e35c50340c 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -10,6 +10,8 @@ "plugin:ghost/node" ], "rules": { + // TODO: remove this rule once it's turned into "error" in the base plugin + "no-shadow": "error", "no-var": "error", "one-var": [2, "never"] } diff --git a/test/.eslintrc.json b/test/.eslintrc.json index 56148d54dc..02501af33d 100644 --- a/test/.eslintrc.json +++ b/test/.eslintrc.json @@ -12,6 +12,9 @@ "plugin:ghost/test" ], "rules": { + // TODO: remove this rule once it's turned into "error" in the base plugin + "no-shadow": "error", + // these rules were were not previously enforced in our custom rules, // they're turned off here because they _are_ enforced in our plugin. // TODO: remove these custom rules and fix the problems in test files where appropriate