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

Add rule S1656 (based on 'no-self-assign') for TS/JS #1427

Closed
vilchik-elena opened this issue Sep 16, 2019 · 1 comment · Fixed by #1453
Closed

Add rule S1656 (based on 'no-self-assign') for TS/JS #1427

vilchik-elena opened this issue Sep 16, 2019 · 1 comment · Fixed by #1453
Assignees
Milestone

Comments

@vilchik-elena
Copy link
Contributor

No description provided.

@quentin-jaquier-sonarsource
Copy link
Contributor

Changes in the rule

  • eslint implementation doesn't consider mutating functions on arrays sort and reverse, ie. a = a.sort() is not raised
  • eslint implementations detects equivalent expressions which differ due to parenthesis a = (a)
  • no-self-assign doesn't handle member expressions using this, so this.x = this.x is not detected

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants