Skip to content

Commit

Permalink
fix(cli): fix CLI flag of bracketSpacing option for lang-specific o…
Browse files Browse the repository at this point in the history
…verride (#5130)

Signed-off-by: Naoki Ikeguchi <[email protected]>
Co-authored-by: Arend van Beelen jr. <[email protected]>
  • Loading branch information
siketyan and arendjr authored Feb 16, 2025
1 parent e9f679f commit 0cbbbe6
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 3 deletions.
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

0 comments on commit 0cbbbe6

Please sign in to comment.