Skip to content

Commit 9ea5329

Browse files
committed
refactor(migrate): don't unpromote useNamingConvention
1 parent bf35fe7 commit 9ea5329

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

crates/biome_cli/tests/snapshots/main_cases_migrate_v2/should_migrate_issue_5465.snap

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,12 @@ expression: redactor(content)
2727
"noVar": "error"
2828
},
2929
"style": {
30+
"useNamingConvention": {
31+
"level": "error",
32+
"options": {
33+
"strictCase": false
34+
}
35+
},
3036
"noDefaultExport": "error",
3137
"noParameterAssign": "error",
3238
"useAsConstAssertion": "error",
@@ -48,14 +54,6 @@ expression: redactor(content)
4854
"noUnsafeFinally": "error",
4955
"noSwitchDeclarations": "off",
5056
"noSelfAssign": "off"
51-
},
52-
"nursery": {
53-
"useNamingConvention": {
54-
"level": "error",
55-
"options": {
56-
"strictCase": false
57-
}
58-
}
5957
}
6058
}
6159
}

crates/biome_migrate/src/analyzers/rule_mover.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,9 @@ impl Rule for RuleMover {
7070
};
7171
let rule_name = rule_name.text();
7272
if let Ok(new_rule) = RuleName::from_str(rule_name) {
73-
if new_rule.group() != current_group {
73+
// TODO: remove the `useNamingConvention` exception,
74+
// once we have promoted the GraphQL `useNamingConvention` rule
75+
if new_rule.group() != current_group && rule_name != "useNamingConvention" {
7476
result.push(State {
7577
rule_node,
7678
new_rule,

0 commit comments

Comments
 (0)