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

fix(css): reformat issue in comments between compound selectors #4537

Merged
merged 1 commit into from
Nov 14, 2024

Conversation

ematipico
Copy link
Member

Summary

Closes #3229

The issue was caused by comments that belonged to left and combinator of a CssCompoundSelector.

To make the reformatting happy, I decided to place the comments of the node to be a trailing comment of right.

The end result is way better than Prettier. Prettier isn't able to remove the empty lines inside comments, while Biome can, as shown in the test snapshot.

Test Plan

Added few test cases similar to the one reported (and the one reported)

@github-actions github-actions bot added A-Formatter Area: formatter L-CSS Language: CSS labels Nov 14, 2024
Copy link
Member Author

Choose a reason for hiding this comment

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

I gave up checking regressions with Prettier tests, because many of them include unsupported syntax, so we have parsing errors. At the end, they aren't reliable

@ematipico ematipico force-pushed the fix/reformat-issue-css branch from be7caa3 to 7089b10 Compare November 14, 2024 12:34
@github-actions github-actions bot added the A-Changelog Area: changelog label Nov 14, 2024
Copy link

codspeed-hq bot commented Nov 14, 2024

CodSpeed Performance Report

Merging #4537 will not alter performance

Comparing fix/reformat-issue-css (7089b10) with main (d0b6e48)

Summary

✅ 99 untouched benchmarks

@ematipico ematipico merged commit a3ffdd7 into main Nov 14, 2024
12 checks passed
@ematipico ematipico deleted the fix/reformat-issue-css branch November 14, 2024 14:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Changelog Area: changelog A-Formatter Area: formatter L-CSS Language: CSS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Reformat issue with css formatter
2 participants