Skip to content

no-self-assign failing for property assignment #6718

@Zzzen

Description

@Zzzen

What version of ESLint are you using?
3.1.1
What parser (default, Babel-ESLint, etc.) are you using?
Default
Please show your full configuration:
{ "env": { "browser": true }, "parserOptions": { "ecmaVersion": 6 }, "rules": { "no-self-assign": "error" } }
What did you do? Please include the actual source code causing the issue.

var a = 123;
a = a;

var b = { a };
b.a = b.a; 

What did you expect to happen?
I would expect b.a = b.a to be a error;
What actually happened? Please include the actual, raw output from ESLint.
Only a.a is an error.

2:5 error 'a' is assigned to itself no-self-assign

✖ 1 problem (1 error, 0 warnings)

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 discussionenhancementThis change enhances an existing feature of ESLintruleRelates 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