-
-
Notifications
You must be signed in to change notification settings - Fork 541
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(overrides
): json.formatter.trailingCommas
should work
#2025
fix(overrides
): json.formatter.trailingCommas
should work
#2025
Conversation
- Respect `json.formatter.trailingCommas` option in `overrides` - Rename internal `trailing_comma`-named json-related vars to `trailing_commas` for consistency - Fix several discrepancies with reference to how `javascript.formatter.trailingComma` is handled
✅ Deploy Preview for biomejs canceled.
|
CodSpeed Performance ReportMerging #2025 will degrade performances by 6.09%Falling back to comparing Summary
Benchmarks breakdown
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a great fix! 🥳 I just left a comment for consistency
@@ -71,7 +71,7 @@ pub struct JsonFormatter { | |||
|
|||
/// Print trailing commas wherever possible in multi-line comma-separated syntactic structures. Defaults to "none". | |||
#[partial(bpaf(long("json-formatter-trailing-commas"), argument("none|all"), optional))] | |||
pub trailing_commas: Option<TrailingCommas>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would like to keep this consistent with the rest of the CLI options.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I reverted them in c0d3ab2.
There're some failures in CI tests, I'll take a look at them tomorrow.
@flazouh I think your |
Summary
json.formatter.trailingCommas
option inoverrides
trailing_comma
-named json-related vars totrailing_commas
for consistencyFixes #2009
Test Plan
Several tests are added in
crates/biome_cli/tests/commands/format.rs
to show thatjson.formatter.trailingCommas
works inoverrides
.