Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 False positive in noSelfAssign with properties on this #576

Closed
1 task done
ZachHaber opened this issue Oct 21, 2023 · 0 comments · Fixed by #589
Closed
1 task done

🐛 False positive in noSelfAssign with properties on this #576

ZachHaber opened this issue Oct 21, 2023 · 0 comments · Fixed by #589
Assignees
Labels
A-Linter Area: linter L-JavaScript Language: JavaScript and super languages S-Bug-confirmed Status: report has been confirmed as a valid bug S-Help-wanted Status: you're familiar with the code base and want to help the project

Comments

@ZachHaber
Copy link

ZachHaber commented Oct 21, 2023

Environment information

biome - playground

What happened?

If you set a literal computed expression on a property on this equal to the same computed expression on any object name, it considers it a self assignment, and same in reverse.

this.arr[0] = p[0];
p[0] = this.arr[0]

Reproduction with several test cases: Playground

Expected result

It should not count things that aren't a self-assignment as a self assignment.

Code of Conduct

  • I agree to follow Biome's Code of Conduct
@ZachHaber ZachHaber changed the title 🐛 False positive in noSelfAssign in functions with this 🐛 False positive in noSelfAssign with properties on this Oct 21, 2023
@Conaclos Conaclos added S-Help-wanted Status: you're familiar with the code base and want to help the project A-Linter Area: linter L-JavaScript Language: JavaScript and super languages S-Bug-confirmed Status: report has been confirmed as a valid bug labels Oct 22, 2023
@ematipico ematipico self-assigned this Oct 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Linter Area: linter L-JavaScript Language: JavaScript and super languages S-Bug-confirmed Status: report has been confirmed as a valid bug S-Help-wanted Status: you're familiar with the code base and want to help the project
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants