-
-
Notifications
You must be signed in to change notification settings - Fork 5k
allow negated condition in for-in guards in guard-for-in rule #7567
Copy link
Copy link
Closed
Closed
Copy link
Labels
acceptedThere is consensus among the team that this change meets the criteria for inclusionThere is consensus among the team that this change meets the criteria for inclusionarchived due to ageThis issue has been archived; please open a new issue for any further discussionThis issue has been archived; please open a new issue for any further discussionenhancementThis change enhances an existing feature of ESLintThis change enhances an existing feature of ESLintruleRelates to ESLint's core rulesRelates to ESLint's core rules
Metadata
Metadata
Assignees
Labels
acceptedThere is consensus among the team that this change meets the criteria for inclusionThere is consensus among the team that this change meets the criteria for inclusionarchived due to ageThis issue has been archived; please open a new issue for any further discussionThis issue has been archived; please open a new issue for any further discussionenhancementThis change enhances an existing feature of ESLintThis change enhances an existing feature of ESLintruleRelates to ESLint's core rulesRelates to ESLint's core rules
I would like
guard-for-into allow the following pattern in addition to what it currently allows.To be clear, the difference is that this guard has a negated condition with a
continueas the consequent. Thecontinueshould be allowed as the only statement in a block as well, to be compatible with that brace style preference.edit:
What rule do you want to change?
guard-for-inDoes this change cause the rule to produce more or fewer warnings?
Fewer.
How will the change be implemented? (New option, new default behavior, etc.)?
New default behaviour.
Please provide some example code that this change will affect:
What does the rule currently do for this code?
Warns.
What will the rule do after it's changed?
Not warn.