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

Introduce more lints from eslint-plugin-unicorn and eslint-plugin-sonarjs? #615

Closed
djahandarie opened this issue Feb 3, 2024 · 1 comment · Fixed by #673
Closed

Introduce more lints from eslint-plugin-unicorn and eslint-plugin-sonarjs? #615

djahandarie opened this issue Feb 3, 2024 · 1 comment · Fixed by #673
Assignees

Comments

@djahandarie
Copy link
Collaborator

djahandarie commented Feb 3, 2024

Regarding #584 (comment):

Use spread [...this.languages.values()]

@toasted-nutbread I found this lint https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-spread.md which seems to capture your advice here.

That unicorn plugin seems to have a lot of other potentially useful lints too, would you like to take a look at it and see which ones you agree with? I'm mostly fine to go with your opinion on what lints we use, but if there's anything you're on the fence on feel free to raise it and I'll add my opinion.


Also regarding #600 (comment):

return the math.floor value instead of assigning and returning

I found https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/prefer-immediate-return.md. Same story here that sonarjs seems to have lots of other potentially useful lints that might be worth adopting.

@djahandarie djahandarie changed the title Introduce more lints from eslint-plugin-unicorn? Introduce more lints from eslint-plugin-unicorn and eslint-plugin-sonarjs? Feb 3, 2024
@toasted-nutbread
Copy link

I'll take a look at them. I've used the sonar one before, so I think there is some good stuff in there. In general, there's a few things I should do with our eslint file, since I recently figured out what one of the issues was related to fully typed typescript analysis. I'll look into these as well as part of that.

@toasted-nutbread toasted-nutbread self-assigned this Feb 4, 2024
This was referenced Feb 4, 2024
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.

2 participants