mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-06 22:40:14 -05:00
Enabled error for "no-shadow" eslint rule
refs 635580f291
- 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
This commit is contained in:
parent
983e2c4e0e
commit
3eeb899e65
2 changed files with 5 additions and 0 deletions
|
@ -10,6 +10,8 @@
|
||||||
"plugin:ghost/node"
|
"plugin:ghost/node"
|
||||||
],
|
],
|
||||||
"rules": {
|
"rules": {
|
||||||
|
// TODO: remove this rule once it's turned into "error" in the base plugin
|
||||||
|
"no-shadow": "error",
|
||||||
"no-var": "error",
|
"no-var": "error",
|
||||||
"one-var": [2, "never"]
|
"one-var": [2, "never"]
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,6 +12,9 @@
|
||||||
"plugin:ghost/test"
|
"plugin:ghost/test"
|
||||||
],
|
],
|
||||||
"rules": {
|
"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,
|
// these rules were were not previously enforced in our custom rules,
|
||||||
// they're turned off here because they _are_ enforced in our plugin.
|
// 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
|
// TODO: remove these custom rules and fix the problems in test files where appropriate
|
||||||
|
|
Loading…
Reference in a new issue