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(cli): fix CLI flag of bracketSpacing option for lang-specific override #5130

Merged
merged 3 commits into from
Feb 16, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/funny-beans-vanish.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@biomejs/biome": patch
---

Fixed the flag `--bracket-spacing` that was duplicated between the global configuration and the language-specific override for JavaScript.
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ The configuration that is contained inside the file `biome.json`
code. Defaults to double.
--javascript-formatter-attribute-position=<multiline|auto> The attribute position style in
JSX elements. Defaults to auto.
--javascript-formatter-bracket-spacing=<true|false> Whether to insert spaces around
brackets in object literals. Defaults to true.
--javascript-object-wrap=<preserve|collapse> Whether to enforce collapsing object literals
when possible. Defaults to preserve.
--javascript-linter-enabled=<true|false> Control the linter for JavaScript (and its super
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ The configuration that is contained inside the file `biome.json`
code. Defaults to double.
--javascript-formatter-attribute-position=<multiline|auto> The attribute position style in
JSX elements. Defaults to auto.
--javascript-formatter-bracket-spacing=<true|false> Whether to insert spaces around
brackets in object literals. Defaults to true.
--javascript-object-wrap=<preserve|collapse> Whether to enforce collapsing object literals
when possible. Defaults to preserve.
--javascript-linter-enabled=<true|false> Control the linter for JavaScript (and its super
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ Formatting options specific to the JavaScript files
code. Defaults to double.
--javascript-formatter-attribute-position=<multiline|auto> The attribute position style in
JSX elements. Defaults to auto.
--bracket-spacing=<true|false> Whether to insert spaces around brackets in object literals.
Defaults to true.
--javascript-formatter-bracket-spacing=<true|false> Whether to insert spaces around
brackets in object literals. Defaults to true.
--javascript-object-wrap=<preserve|collapse> Whether to enforce collapsing object literals
when possible. Defaults to preserve.

Expand Down
2 changes: 1 addition & 1 deletion crates/biome_configuration/src/javascript/formatter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ pub struct JsFormatterConfiguration {

// it's also a top-level configurable property.
/// Whether to insert spaces around brackets in object literals. Defaults to true.
#[bpaf(long("bracket-spacing"), argument("true|false"))]
#[bpaf(long("javascript-formatter-bracket-spacing"), argument("true|false"))]
#[serde(skip_serializing_if = "Option::is_none")]
pub bracket_spacing: Option<BracketSpacing>,

Expand Down
Loading