Skip to content

Commit 6778590

Browse files
committed
fix(linter/jest/prefer-lowercase-title): update Default implementation for PreferLowercaseTitleConfig
1 parent 7b08822 commit 6778590

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

crates/oxc_linter/src/rules/jest/prefer_lowercase_title/mod.rs

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,25 @@ fn prefer_lowercase_title_diagnostic(title: &str, span: Span) -> OxcDiagnostic {
2020
.with_label(span)
2121
}
2222

23-
#[derive(Debug, Default, Clone)]
23+
#[derive(Debug, Clone)]
2424
pub struct PreferLowercaseTitleConfig {
2525
allowed_prefixes: Vec<CompactStr>,
2626
ignore: Vec<CompactStr>,
2727
ignore_top_level_describe: bool,
2828
lowercase_first_character_only: bool,
2929
}
3030

31+
impl Default for PreferLowercaseTitleConfig {
32+
fn default() -> Self {
33+
Self {
34+
allowed_prefixes: Vec::new(),
35+
ignore: Vec::new(),
36+
ignore_top_level_describe: false,
37+
lowercase_first_character_only: true,
38+
}
39+
}
40+
}
41+
3142
impl std::ops::Deref for PreferLowercaseTitle {
3243
type Target = PreferLowercaseTitleConfig;
3344

crates/oxc_linter/tests/rule_configuration_test.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ fn test_rule_default_matches_from_configuration_null() {
2525
// 1. The Default implementation returns the same values as from_configuration(null), or
2626
// 2. The from_configuration method is updated to return Default::default() when given null
2727
let exceptions = [
28-
"jest/prefer-lowercase-title",
2928
"react/jsx-filename-extension",
3029
"typescript/no-this-alias",
3130
"unicorn/prefer-object-from-entries",

0 commit comments

Comments
 (0)