Skip to content

no-self-assign rule failing for shorthand assignment operators #5371

@pillowfication

Description

@pillowfication
/*eslint no-self-assign: 2*/
var a = 5;
a += a;        // error 'a' is assigned to itself

This fails for all the similar operators when it should be allowed.

Metadata

Metadata

Assignees

Labels

acceptedThere 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 discussionbugESLint is working incorrectlyruleRelates to ESLint's core rules

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions