Skip to content

Commit f3cfa8a

Browse files
authored
fix(schema): make optional the options JSON schema field (#4080)
1 parent cc4c867 commit f3cfa8a

File tree

2 files changed

+29
-19
lines changed

2 files changed

+29
-19
lines changed

packages/@biomejs/biome/configuration_schema.json

Lines changed: 19 additions & 19 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

xtask/codegen/src/generate_schema.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,18 @@ fn rename_partial_references_in_schema(mut schema: RootSchema) -> RootSchema {
8686
key = "RuleFixConfiguration".to_string();
8787
} else if let Some(stripped) = key.strip_prefix("RuleWithOptions_for_") {
8888
key = format!("RuleWith{stripped}");
89+
if let Schema::Object(schema_object) = &mut schema {
90+
if let Some(object) = &mut schema_object.object {
91+
object.required.remove("options");
92+
}
93+
}
8994
} else if let Some(stripped) = key.strip_prefix("RuleWithFixOptions_for_") {
9095
key = format!("RuleWith{stripped}");
96+
if let Schema::Object(schema_object) = &mut schema {
97+
if let Some(object) = &mut schema_object.object {
98+
object.required.remove("options");
99+
}
100+
}
91101
} else if let Some(stripped) = key
92102
.strip_prefix("RuleConfiguration_for_")
93103
.map(|x| x.strip_suffix("Options").unwrap_or(x))

0 commit comments

Comments
 (0)