Skip to content

Commit 9dc92e7

Browse files
committed
fix(linter): default options for unicorn/switch-case-braces (#12539)
related #12532
1 parent d3604f9 commit 9dc92e7

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

crates/oxc_linter/src/rules/unicorn/switch_case_braces.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,17 @@ fn switch_case_braces_diagnostic_unnecessary_braces(span: Span) -> OxcDiagnostic
2323
.with_label(span)
2424
}
2525

26-
#[derive(Debug, Default, Clone)]
26+
#[derive(Debug, Clone)]
2727
pub struct SwitchCaseBraces {
2828
always_braces: bool,
2929
}
3030

31+
impl Default for SwitchCaseBraces {
32+
fn default() -> Self {
33+
Self { always_braces: true }
34+
}
35+
}
36+
3137
declare_oxc_lint!(
3238
/// ### What it does
3339
///

0 commit comments

Comments
 (0)