Skip to content

Commit

Permalink
feat(cli)!: rename --javascript-attribute-position to `--javascript…
Browse files Browse the repository at this point in the history
…-formatter-attribute-position` (#5132)

Signed-off-by: Naoki Ikeguchi <[email protected]>
  • Loading branch information
siketyan authored Feb 16, 2025
1 parent a41673b commit 3065eb4
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 10 deletions.
5 changes: 5 additions & 0 deletions .changeset/hot-moons-kiss.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@biomejs/biome": minor
---

CLI flag `--javascript-attribute-position` was renamed to `--javascript-formatter-attribute-position` for consistency.
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ The configuration that is contained inside the file `biome.json`
JavaScript (and its super languages) files. Defaults to 80.
--javascript-formatter-quote-style=<double|single> The type of quotes used in JavaScript
code. Defaults to double.
--javascript-attribute-position=<multiline|auto> The attribute position style in jsx
elements. Defaults to auto.
--javascript-formatter-attribute-position=<multiline|auto> The attribute position style in
JSX elements. Defaults to auto.
--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 @@ -69,8 +69,8 @@ The configuration that is contained inside the file `biome.json`
JavaScript (and its super languages) files. Defaults to 80.
--javascript-formatter-quote-style=<double|single> The type of quotes used in JavaScript
code. Defaults to double.
--javascript-attribute-position=<multiline|auto> The attribute position style in jsx
elements. Defaults to auto.
--javascript-formatter-attribute-position=<multiline|auto> The attribute position style in
JSX elements. Defaults to auto.
--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 @@ -51,8 +51,8 @@ Formatting options specific to the JavaScript files
JavaScript (and its super languages) files. Defaults to 80.
--javascript-formatter-quote-style=<double|single> The type of quotes used in JavaScript
code. Defaults to double.
--javascript-attribute-position=<multiline|auto> The attribute position style in jsx
elements. Defaults to auto.
--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-object-wrap=<preserve|collapse> Whether to enforce collapsing object literals
Expand Down
7 changes: 5 additions & 2 deletions crates/biome_configuration/src/javascript/formatter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,11 @@ pub struct JsFormatterConfiguration {
pub quote_style: Option<QuoteStyle>,

// it's also a top-level configurable property.
/// The attribute position style in jsx elements. Defaults to auto.
#[bpaf(long("javascript-attribute-position"), argument("multiline|auto"))]
/// The attribute position style in JSX elements. Defaults to auto.
#[bpaf(
long("javascript-formatter-attribute-position"),
argument("multiline|auto")
)]
#[serde(skip_serializing_if = "Option::is_none")]
pub attribute_position: Option<AttributePosition>,

Expand Down
2 changes: 1 addition & 1 deletion packages/@biomejs/backend-jsonrpc/src/workspace.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/@biomejs/biome/configuration_schema.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 3065eb4

Please sign in to comment.