@@ -9,21 +9,31 @@ use crate::{
99} ;
1010use biome_configuration:: analyzer:: assist:: AssistEnabled ;
1111use biome_configuration:: analyzer:: { AnalyzerSelector , LinterEnabled } ;
12- use biome_configuration:: css:: { CssFormatterConfiguration , CssLinterConfiguration } ;
13- use biome_configuration:: formatter:: FormatterEnabled ;
12+ use biome_configuration:: css:: {
13+ CssFormatterConfiguration , CssLinterConfiguration , CssParserConfiguration ,
14+ } ;
15+ use biome_configuration:: formatter:: { FormatWithErrorsEnabled , FormatterEnabled } ;
1416use biome_configuration:: graphql:: { GraphqlFormatterConfiguration , GraphqlLinterConfiguration } ;
1517use biome_configuration:: html:: { HtmlFormatterConfiguration , html_formatter_configuration} ;
1618use biome_configuration:: javascript:: { JsFormatterConfiguration , JsLinterConfiguration } ;
17- use biome_configuration:: json:: { JsonFormatterConfiguration , JsonLinterConfiguration } ;
19+ use biome_configuration:: json:: {
20+ JsonFormatterConfiguration , JsonLinterConfiguration , JsonParserConfiguration ,
21+ } ;
1822use biome_configuration:: vcs:: VcsConfiguration ;
1923use biome_configuration:: { BiomeDiagnostic , Configuration } ;
2024use biome_configuration:: {
2125 FilesConfiguration , FormatterConfiguration , LinterConfiguration , configuration,
22- css:: css_formatter_configuration, css:: css_linter_configuration, files_configuration,
23- formatter_configuration, graphql:: graphql_formatter_configuration,
24- graphql:: graphql_linter_configuration, javascript:: js_formatter_configuration,
25- javascript:: js_linter_configuration, json:: json_formatter_configuration,
26- json:: json_linter_configuration, linter_configuration, vcs:: vcs_configuration,
26+ css:: { css_formatter_configuration, css_linter_configuration, css_parser_configuration} ,
27+ files_configuration, formatter_configuration,
28+ graphql:: graphql_formatter_configuration,
29+ graphql:: graphql_linter_configuration,
30+ javascript:: js_formatter_configuration,
31+ javascript:: js_linter_configuration,
32+ json:: json_formatter_configuration,
33+ json:: json_linter_configuration,
34+ json:: json_parser_configuration,
35+ linter_configuration,
36+ vcs:: vcs_configuration,
2737} ;
2838use biome_console:: { Console , ConsoleExt , markup} ;
2939use biome_deserialize:: Merge ;
@@ -146,6 +156,17 @@ pub enum BiomeCommand {
146156 #[ bpaf( long( "enforce-assist" ) , argument( "true|false" ) , fallback( true ) ) ]
147157 enforce_assist : bool ,
148158
159+ /// Whether formatting should be allowed to proceed if a given file
160+ /// has syntax errors
161+ #[ bpaf( long( "format-with-errors" ) , argument( "true|false" ) ) ]
162+ format_with_errors : Option < FormatWithErrorsEnabled > ,
163+
164+ #[ bpaf( external( json_parser_configuration) , optional, hide_usage) ]
165+ json_parser : Option < JsonParserConfiguration > ,
166+
167+ #[ bpaf( external( css_parser_configuration) , optional, hide_usage, hide) ]
168+ css_parser : Option < CssParserConfiguration > ,
169+
149170 #[ bpaf( external( configuration) , hide_usage, optional) ]
150171 configuration : Option < Configuration > ,
151172 #[ bpaf( external, hide_usage) ]
@@ -209,6 +230,12 @@ pub enum BiomeCommand {
209230 #[ bpaf( long( "reason" ) , argument( "STRING" ) ) ]
210231 suppression_reason : Option < String > ,
211232
233+ #[ bpaf( external( json_parser_configuration) , optional, hide_usage) ]
234+ json_parser : Option < JsonParserConfiguration > ,
235+
236+ #[ bpaf( external( css_parser_configuration) , optional, hide_usage, hide) ]
237+ css_parser : Option < CssParserConfiguration > ,
238+
212239 #[ bpaf( external( linter_configuration) , hide_usage, optional) ]
213240 linter_configuration : Option < LinterConfiguration > ,
214241
@@ -294,12 +321,18 @@ pub enum BiomeCommand {
294321 #[ bpaf( external( json_formatter_configuration) , optional, hide_usage) ]
295322 json_formatter : Option < JsonFormatterConfiguration > ,
296323
297- #[ bpaf( external( css_formatter_configuration) , optional, hide_usage, hide) ]
298- css_formatter : Option < CssFormatterConfiguration > ,
324+ #[ bpaf( external( json_parser_configuration) , optional, hide_usage) ]
325+ json_parser : Option < JsonParserConfiguration > ,
326+
327+ #[ bpaf( external( css_parser_configuration) , optional, hide_usage, hide) ]
328+ css_parser : Option < CssParserConfiguration > ,
299329
300330 #[ bpaf( external( graphql_formatter_configuration) , optional, hide_usage, hide) ]
301331 graphql_formatter : Option < GraphqlFormatterConfiguration > ,
302332
333+ #[ bpaf( external( css_formatter_configuration) , optional, hide_usage, hide) ]
334+ css_formatter : Option < CssFormatterConfiguration > ,
335+
303336 #[ bpaf( external( html_formatter_configuration) , optional, hide_usage, hide) ]
304337 html_formatter : Option < HtmlFormatterConfiguration > ,
305338
@@ -365,6 +398,17 @@ pub enum BiomeCommand {
365398 #[ bpaf( long( "assist-enabled" ) , argument( "true|false" ) , optional) ]
366399 assist_enabled : Option < AssistEnabled > ,
367400
401+ /// Whether formatting should be allowed to proceed if a given file
402+ /// has syntax errors
403+ #[ bpaf( long( "format-with-errors" ) , argument( "true|false" ) ) ]
404+ format_with_errors : Option < FormatWithErrorsEnabled > ,
405+
406+ #[ bpaf( external( json_parser_configuration) , optional, hide_usage) ]
407+ json_parser : Option < JsonParserConfiguration > ,
408+
409+ #[ bpaf( external( css_parser_configuration) , optional, hide_usage, hide) ]
410+ css_parser : Option < CssParserConfiguration > ,
411+
368412 /// Allows enforcing assist, and make the CLI fail if some actions aren't applied. Defaults to `true`.
369413 #[ bpaf( long( "enforce-assist" ) , argument( "true|false" ) , fallback( true ) ) ]
370414 enforce_assist : bool ,
0 commit comments