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

feat(lint): useCollapsedElseIf #160

Merged
merged 5 commits into from
Sep 6, 2023

Conversation

n-gude
Copy link
Contributor

@n-gude n-gude commented Sep 5, 2023

Summary

This PR implements the useCollapsedElseIf lint rule (#43).

It provides a code fix unless the else-block statement contains a comment. The placement of the comment would be questionable. (ESLint handles it the same way.)

Test Plan

Tests included.

@github-actions github-actions bot added A-Project Area: project A-Linter Area: linter A-Website Area: website L-JavaScript Language: JavaScript and super languages A-Diagnostic Area: diagnostocis labels Sep 5, 2023
fix: comment detection,
feat: differentiate between safe and suggested code fix
Copy link
Member

@Conaclos Conaclos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! After the minor changes I proposed I think we are ready for merging your contribution :)

@n-gude n-gude requested a review from Conaclos September 6, 2023 09:39
@Conaclos Conaclos merged commit db900ee into biomejs:main Sep 6, 2023
13 of 14 checks passed
@Conaclos
Copy link
Member

Conaclos commented Sep 6, 2023

Thanks! Great contribution :) I had to change the description of the rule: it caused a fail when the website is bundled (this seems to be a bug of Astro).

@Conaclos Conaclos added the S-Needs-changelog-update When a PR needs a follow up PR to udpate the changelog label Sep 6, 2023
@n-gude
Copy link
Contributor Author

n-gude commented Sep 7, 2023

I have to thank for accepting my first PR! 🙌 Cool to already see it in action in the playground!

The issue (#43) is still open. Can be closed, right?

@Conaclos
Copy link
Member

Conaclos commented Sep 7, 2023

@n-gude This is a great first contribution! Looking forward for your future ones :)
Have you any remarks about your experience as first-time contributor? Doc/processes to improve?

@Conaclos Conaclos removed the S-Needs-changelog-update When a PR needs a follow up PR to udpate the changelog label Sep 13, 2023
@n-gude n-gude deleted the feat/useCollapsedElseIf branch October 7, 2023 11:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Diagnostic Area: diagnostocis A-Linter Area: linter A-Project Area: project A-Website Area: website L-JavaScript Language: JavaScript and super languages
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants