-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Closed
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
Description
As the existing rule no-negated-in-lhs, it seems like it would be good to also disallow
if (!a instanceof b) // do something
since the developer certainly meant to write
if (!(a instanceof b)) // do something
instead. This prevents errors, and there's no legitimate case for the former that I can think of, so I think this could be enabled by default as with no-negated-in-lhs. I've thrown together a quick copy and paste job of no-negated-in-lhs which works; will attach PR.
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
vickychijwani
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