Proposal: change no-redeclare default behavior #11405
Labels
accepted
There is consensus among the team that this change meets the criteria for inclusion
archived due to age
This issue has been archived; please open a new issue for any further discussion
breaking
This change is backwards-incompatible
enhancement
This change enhances an existing feature of ESLint
rule
Relates to ESLint's core rules
What rule do you want to change?
Does this change cause the rule to produce more or fewer warnings?
How will the change be implemented? (New option, new default behavior, etc.)?
builtinGlobals
option totrue
.Please provide some example code that this change will affect:
What does the rule currently do for this code?
What will the rule do after it's changed?
top
variable as a redeclaration becausebrowser
environment has it.Are you willing to submit a pull request to implement this change?
Yes.
Context:
top
variable, browsers ignore thevar top
declaration silently. This can cause confusion and I believe that it's worth to warn by default.no-undef
rule had warned redeclarations of globals by default, but it was removed in Redeclaring global variables should trigger "no-redeclare", not "no-undef". #4504. I think that we can re-enable it onno-redeclare
rule.The text was updated successfully, but these errors were encountered: