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

🐛 correctness/noSelfAssign false positive #322

Closed
1 task done
jpike88 opened this issue Sep 18, 2023 · 0 comments · Fixed by #385
Closed
1 task done

🐛 correctness/noSelfAssign false positive #322

jpike88 opened this issue Sep 18, 2023 · 0 comments · Fixed by #385
Assignees
Labels
A-Linter Area: linter S-Bug-confirmed Status: report has been confirmed as a valid bug

Comments

@jpike88
Copy link

jpike88 commented Sep 18, 2023

Environment information

biome v 1.2.2

What happened?

See code.

document
								.querySelector(`[data-field-id="customModel-container"]`)
								.querySelector('input').value = document
								.querySelector(`[data-field-id="${modelField.id}-field"]`)
								.querySelector('input').value;

error is:

✖ value is assigned to itself.
  
    3694 │ 								.querySelector('input').value = document
    3695 │ 								.querySelector(`[data-field-id="${modelField.id}-field"]`)
  > 3696 │ 								.querySelector('input').value;
         │ 								                        ^^^^^
    3697 │ 						});
    3698 │ 					},
  
  ℹ This is where is assigned.
  
    3692 │ 							document
    3693 │ 								.querySelector(`[data-field-id="customModel-container"]`)
  > 3694 │ 								.querySelector('input').value = document
         │ 								                        ^^^^^
    3695 │ 								.querySelector(`[data-field-id="${modelField.id}-field"]`)
    3696 │ 								.querySelector('input').value;

Expected result

That's not a self-assignment though.

Code of Conduct

  • I agree to follow Biome's Code of Conduct
@ematipico ematipico added A-Linter Area: linter S-Bug-confirmed Status: report has been confirmed as a valid bug labels Sep 18, 2023
@ematipico ematipico self-assigned this Sep 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Linter Area: linter S-Bug-confirmed Status: report has been confirmed as a valid bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants