-
-
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 discussionfeatureThis change adds a new feature to ESLintThis change adds a new feature to ESLinthelp wantedThe team would welcome a contribution from the community for this issueThe team would welcome a contribution from the community for this issueruleRelates to ESLint's core rulesRelates to ESLint's core rules
Description
Proposing a new rule which forbids multiple assignments in a single expression.
Code that should trigger a warning:
a = b = c;Code that should not trigger a warning:
b = c;
a = c;They're hard to read and it's not immediately clear what is assigned to what. In above example, one could think that the order of evaluation is left-to-right, while it actually is right-to-left.
hrdwdmrbl
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 discussionfeatureThis change adds a new feature to ESLintThis change adds a new feature to ESLinthelp wantedThe team would welcome a contribution from the community for this issueThe team would welcome a contribution from the community for this issueruleRelates to ESLint's core rulesRelates to ESLint's core rules