Skip to content

Commit 16a5245

Browse files
committed
fix: Add docstrings for language-specific setting
1 parent 9178d73 commit 16a5245

File tree

8 files changed

+48
-34
lines changed

8 files changed

+48
-34
lines changed

crates/biome_cli/tests/snapshots/main_commands_check/check_help.snap

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,9 @@ The configuration that is contained inside the file `biome.json`
7171
its super languages) files.
7272
--javascript-formatter-indent-width=NUMBER The size of the indentation applied to
7373
JavaScript (and its super languages) files. Default to 2.
74-
--javascript-formatter-line-ending=<lf|crlf|cr> The type of line ending applied to
75-
JavaScript (and its super languages) files.
74+
--javascript-formatter-line-ending=<lf|crlf|cr|auto> The type of line ending applied to
75+
JavaScript (and its super languages) files. `auto` uses CRLF on
76+
Windows and LF on other platforms.
7677
--javascript-formatter-line-width=NUMBER What's the max width of a line applied to
7778
JavaScript (and its super languages) files. Defaults to 80.
7879
--javascript-formatter-quote-style=<double|single> The type of quotes used in JavaScript
@@ -103,8 +104,9 @@ The configuration that is contained inside the file `biome.json`
103104
languages) files.
104105
--json-formatter-indent-width=NUMBER The size of the indentation applied to JSON (and its
105106
super languages) files. Default to 2.
106-
--json-formatter-line-ending=<lf|crlf|cr> The type of line ending applied to JSON (and its
107-
super languages) files.
107+
--json-formatter-line-ending=<lf|crlf|cr|auto> The type of line ending applied to JSON (and
108+
its super languages) files. `auto` uses CRLF on Windows and LF on
109+
other platforms.
108110
--json-formatter-line-width=NUMBER What's the max width of a line applied to JSON (and its
109111
super languages) files. Defaults to 80.
110112
--json-formatter-trailing-commas=<none|all> Print trailing commas wherever possible in
@@ -130,8 +132,9 @@ The configuration that is contained inside the file `biome.json`
130132
languages) files.
131133
--css-formatter-indent-width=NUMBER The size of the indentation applied to CSS (and its
132134
super languages) files. Default to 2.
133-
--css-formatter-line-ending=<lf|crlf|cr> The type of line ending applied to CSS (and its
134-
super languages) files.
135+
--css-formatter-line-ending=<lf|crlf|cr|auto> The type of line ending applied to CSS (and
136+
its super languages) files. `auto` uses CRLF on Windows and LF on
137+
other platforms.
135138
--css-formatter-line-width=NUMBER What's the max width of a line applied to CSS (and its
136139
super languages) files. Defaults to 80.
137140
--css-formatter-quote-style=<double|single> The type of quotes used in CSS code. Defaults
@@ -142,8 +145,8 @@ The configuration that is contained inside the file `biome.json`
142145
--graphql-formatter-indent-style=<tab|space> The indent style applied to GraphQL files.
143146
--graphql-formatter-indent-width=NUMBER The size of the indentation applied to GraphQL
144147
files. Default to 2.
145-
--graphql-formatter-line-ending=<lf|crlf|cr> The type of line ending applied to GraphQL
146-
files.
148+
--graphql-formatter-line-ending=<lf|crlf|cr|auto> The type of line ending applied to
149+
GraphQL files. `auto` uses CRLF on Windows and LF on other platforms.
147150
--graphql-formatter-line-width=NUMBER What's the max width of a line applied to GraphQL
148151
files. Defaults to 80.
149152
--graphql-formatter-quote-style=<double|single> The type of quotes used in GraphQL code.
@@ -165,8 +168,9 @@ The configuration that is contained inside the file `biome.json`
165168
languages) files.
166169
--html-formatter-indent-width=NUMBER The size of the indentation applied to HTML (and its
167170
super languages) files. Default to 2.
168-
--html-formatter-line-ending=<lf|crlf|cr> The type of line ending applied to HTML (and its
169-
super languages) files.
171+
--html-formatter-line-ending=<lf|crlf|cr|auto> The type of line ending applied to HTML (and
172+
its super languages) files. `auto` uses CRLF on Windows and LF on
173+
other platforms.
170174
--html-formatter-line-width=NUMBER What's the max width of a line applied to HTML (and its
171175
super languages) files. Defaults to 80.
172176
--html-formatter-attribute-position=<multiline|auto> The attribute position style in HTML

crates/biome_cli/tests/snapshots/main_commands_ci/ci_help.snap

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,9 @@ The configuration that is contained inside the file `biome.json`
7272
its super languages) files.
7373
--javascript-formatter-indent-width=NUMBER The size of the indentation applied to
7474
JavaScript (and its super languages) files. Default to 2.
75-
--javascript-formatter-line-ending=<lf|crlf|cr> The type of line ending applied to
76-
JavaScript (and its super languages) files.
75+
--javascript-formatter-line-ending=<lf|crlf|cr|auto> The type of line ending applied to
76+
JavaScript (and its super languages) files. `auto` uses CRLF on
77+
Windows and LF on other platforms.
7778
--javascript-formatter-line-width=NUMBER What's the max width of a line applied to
7879
JavaScript (and its super languages) files. Defaults to 80.
7980
--javascript-formatter-quote-style=<double|single> The type of quotes used in JavaScript
@@ -104,8 +105,9 @@ The configuration that is contained inside the file `biome.json`
104105
languages) files.
105106
--json-formatter-indent-width=NUMBER The size of the indentation applied to JSON (and its
106107
super languages) files. Default to 2.
107-
--json-formatter-line-ending=<lf|crlf|cr> The type of line ending applied to JSON (and its
108-
super languages) files.
108+
--json-formatter-line-ending=<lf|crlf|cr|auto> The type of line ending applied to JSON (and
109+
its super languages) files. `auto` uses CRLF on Windows and LF on
110+
other platforms.
109111
--json-formatter-line-width=NUMBER What's the max width of a line applied to JSON (and its
110112
super languages) files. Defaults to 80.
111113
--json-formatter-trailing-commas=<none|all> Print trailing commas wherever possible in
@@ -131,8 +133,9 @@ The configuration that is contained inside the file `biome.json`
131133
languages) files.
132134
--css-formatter-indent-width=NUMBER The size of the indentation applied to CSS (and its
133135
super languages) files. Default to 2.
134-
--css-formatter-line-ending=<lf|crlf|cr> The type of line ending applied to CSS (and its
135-
super languages) files.
136+
--css-formatter-line-ending=<lf|crlf|cr|auto> The type of line ending applied to CSS (and
137+
its super languages) files. `auto` uses CRLF on Windows and LF on
138+
other platforms.
136139
--css-formatter-line-width=NUMBER What's the max width of a line applied to CSS (and its
137140
super languages) files. Defaults to 80.
138141
--css-formatter-quote-style=<double|single> The type of quotes used in CSS code. Defaults
@@ -143,8 +146,8 @@ The configuration that is contained inside the file `biome.json`
143146
--graphql-formatter-indent-style=<tab|space> The indent style applied to GraphQL files.
144147
--graphql-formatter-indent-width=NUMBER The size of the indentation applied to GraphQL
145148
files. Default to 2.
146-
--graphql-formatter-line-ending=<lf|crlf|cr> The type of line ending applied to GraphQL
147-
files.
149+
--graphql-formatter-line-ending=<lf|crlf|cr|auto> The type of line ending applied to
150+
GraphQL files. `auto` uses CRLF on Windows and LF on other platforms.
148151
--graphql-formatter-line-width=NUMBER What's the max width of a line applied to GraphQL
149152
files. Defaults to 80.
150153
--graphql-formatter-quote-style=<double|single> The type of quotes used in GraphQL code.
@@ -166,8 +169,9 @@ The configuration that is contained inside the file `biome.json`
166169
languages) files.
167170
--html-formatter-indent-width=NUMBER The size of the indentation applied to HTML (and its
168171
super languages) files. Default to 2.
169-
--html-formatter-line-ending=<lf|crlf|cr> The type of line ending applied to HTML (and its
170-
super languages) files.
172+
--html-formatter-line-ending=<lf|crlf|cr|auto> The type of line ending applied to HTML (and
173+
its super languages) files. `auto` uses CRLF on Windows and LF on
174+
other platforms.
171175
--html-formatter-line-width=NUMBER What's the max width of a line applied to HTML (and its
172176
super languages) files. Defaults to 80.
173177
--html-formatter-attribute-position=<multiline|auto> The attribute position style in HTML

crates/biome_cli/tests/snapshots/main_commands_format/format_help.snap

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,9 @@ Formatting options specific to the JavaScript files
5353
its super languages) files.
5454
--javascript-formatter-indent-width=NUMBER The size of the indentation applied to
5555
JavaScript (and its super languages) files. Default to 2.
56-
--javascript-formatter-line-ending=<lf|crlf|cr> The type of line ending applied to
57-
JavaScript (and its super languages) files.
56+
--javascript-formatter-line-ending=<lf|crlf|cr|auto> The type of line ending applied to
57+
JavaScript (and its super languages) files. `auto` uses CRLF on
58+
Windows and LF on other platforms.
5859
--javascript-formatter-line-width=NUMBER What's the max width of a line applied to
5960
JavaScript (and its super languages) files. Defaults to 80.
6061
--javascript-formatter-quote-style=<double|single> The type of quotes used in JavaScript
@@ -143,8 +144,9 @@ Available options:
143144
languages) files.
144145
--json-formatter-indent-width=NUMBER The size of the indentation applied to JSON (and its
145146
super languages) files. Default to 2.
146-
--json-formatter-line-ending=<lf|crlf|cr> The type of line ending applied to JSON (and its
147-
super languages) files.
147+
--json-formatter-line-ending=<lf|crlf|cr|auto> The type of line ending applied to JSON (and
148+
its super languages) files. `auto` uses CRLF on Windows and LF on
149+
other platforms.
148150
--json-formatter-line-width=NUMBER What's the max width of a line applied to JSON (and its
149151
super languages) files. Defaults to 80.
150152
--json-formatter-trailing-commas=<none|all> Print trailing commas wherever possible in

crates/biome_configuration/src/css.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,8 @@ pub struct CssFormatterConfiguration {
8181
#[serde(skip_serializing_if = "Option::is_none")]
8282
pub indent_width: Option<IndentWidth>,
8383

84-
/// The type of line ending applied to CSS (and its super languages) files.
85-
#[bpaf(long("css-formatter-line-ending"), argument("lf|crlf|cr"))]
84+
/// The type of line ending applied to CSS (and its super languages) files. `auto` uses CRLF on Windows and LF on other platforms.
85+
#[bpaf(long("css-formatter-line-ending"), argument("lf|crlf|cr|auto"))]
8686
#[serde(skip_serializing_if = "Option::is_none")]
8787
pub line_ending: Option<LineEnding>,
8888

crates/biome_configuration/src/graphql.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ pub struct GraphqlFormatterConfiguration {
5050
#[bpaf(long("graphql-formatter-indent-width"), argument("NUMBER"))]
5151
pub indent_width: Option<IndentWidth>,
5252

53-
/// The type of line ending applied to GraphQL files.
54-
#[bpaf(long("graphql-formatter-line-ending"), argument("lf|crlf|cr"))]
53+
/// The type of line ending applied to GraphQL files. `auto` uses CRLF on Windows and LF on other platforms.
54+
#[bpaf(long("graphql-formatter-line-ending"), argument("lf|crlf|cr|auto"))]
5555
pub line_ending: Option<LineEnding>,
5656

5757
/// What's the max width of a line applied to GraphQL files. Defaults to 80.

crates/biome_configuration/src/html.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,12 @@ pub struct HtmlFormatterConfiguration {
6565
#[serde(skip_serializing_if = "Option::is_none")]
6666
pub indent_width: Option<IndentWidth>,
6767

68-
/// The type of line ending applied to HTML (and its super languages) files.
69-
#[bpaf(long("html-formatter-line-ending"), argument("lf|crlf|cr"), optional)]
68+
/// The type of line ending applied to HTML (and its super languages) files. `auto` uses CRLF on Windows and LF on other platforms.
69+
#[bpaf(
70+
long("html-formatter-line-ending"),
71+
argument("lf|crlf|cr|auto"),
72+
optional
73+
)]
7074
#[serde(skip_serializing_if = "Option::is_none")]
7175
pub line_ending: Option<LineEnding>,
7276

crates/biome_configuration/src/javascript/formatter.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,10 @@ pub struct JsFormatterConfiguration {
7474
#[serde(skip_serializing_if = "Option::is_none")]
7575
pub indent_width: Option<IndentWidth>,
7676

77-
/// The type of line ending applied to JavaScript (and its super languages) files.
77+
/// The type of line ending applied to JavaScript (and its super languages) files. `auto` uses CRLF on Windows and LF on other platforms.
7878
#[bpaf(
7979
long("javascript-formatter-line-ending"),
80-
argument("lf|crlf|cr"),
80+
argument("lf|crlf|cr|auto"),
8181
optional
8282
)]
8383
#[serde(skip_serializing_if = "Option::is_none")]

crates/biome_configuration/src/json.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@ pub struct JsonFormatterConfiguration {
7777
#[serde(skip_serializing_if = "Option::is_none")]
7878
pub indent_width: Option<IndentWidth>,
7979

80-
/// The type of line ending applied to JSON (and its super languages) files.
81-
#[bpaf(long("json-formatter-line-ending"), argument("lf|crlf|cr"))]
80+
/// The type of line ending applied to JSON (and its super languages) files. `auto` uses CRLF on Windows and LF on other platforms.
81+
#[bpaf(long("json-formatter-line-ending"), argument("lf|crlf|cr|auto"))]
8282
#[serde(skip_serializing_if = "Option::is_none")]
8383
pub line_ending: Option<LineEnding>,
8484

0 commit comments

Comments
 (0)