-
-
Notifications
You must be signed in to change notification settings - Fork 508
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(css_formatter): Add quoteStyle
for css formatting
#1384
Conversation
✅ Deploy Preview for biomejs canceled.
|
CodSpeed Performance ReportMerging #1384 will create unknown performance changesFalling back to comparing Summary
Benchmarks breakdown
|
ee796c2
to
10f5d9e
Compare
i'm fairly positive the benchmark dropping/adding is just because it's stale, and the results on main haven't updated to the new grouping? gonna merge anyway since this change definitely doesn't touch those, so i don't believe it's related. |
Summary
#1285. This implements the
quoteStyle
option under thecss.formatter
options, allowing strings to be normalized to a single quote style, similar to how JS works.Some additional notes:
biome_formatter
crate so that it could be reused, but I ran into quite a few issues when I tried to make it a global formatter option rather than a language-specific one. We're talking about overrides, and I think after we flesh that out it might be easier to do this. For now, it acts like a global formatter property since the CLI just uses--quote-style
and applies to both instead of--*-formatter-quote-style
for each, but it's not technically handled as top-level setting right now.biome_formatter
crate. Not much of that logic is really js-specific, but there is some stuff that can't be transferred. I just copied the implementation over and pared it down for CSS for now (and added the ability to add quotes to non-string tokens).Json*
things), and then even more of it is just wiring through the option from the CLI to the service to the formatter itself.Test Plan
Added tests to the cli, service, and formatter to check that the config is being parsed correctly and the formatter respects the option when formatting strings.