diff --git a/crates/oxc_linter/src/rules/jest/prefer_lowercase_title/mod.rs b/crates/oxc_linter/src/rules/jest/prefer_lowercase_title/mod.rs index 7bfa777e90044..7948fcc184639 100644 --- a/crates/oxc_linter/src/rules/jest/prefer_lowercase_title/mod.rs +++ b/crates/oxc_linter/src/rules/jest/prefer_lowercase_title/mod.rs @@ -20,7 +20,7 @@ fn prefer_lowercase_title_diagnostic(title: &str, span: Span) -> OxcDiagnostic { .with_label(span) } -#[derive(Debug, Default, Clone)] +#[derive(Debug, Clone)] pub struct PreferLowercaseTitleConfig { allowed_prefixes: Vec, ignore: Vec, @@ -28,6 +28,17 @@ pub struct PreferLowercaseTitleConfig { lowercase_first_character_only: bool, } +impl Default for PreferLowercaseTitleConfig { + fn default() -> Self { + Self { + allowed_prefixes: Vec::new(), + ignore: Vec::new(), + ignore_top_level_describe: false, + lowercase_first_character_only: true, + } + } +} + impl std::ops::Deref for PreferLowercaseTitle { type Target = PreferLowercaseTitleConfig; diff --git a/crates/oxc_linter/tests/rule_configuration_test.rs b/crates/oxc_linter/tests/rule_configuration_test.rs index a77db06764267..047d7d705945c 100644 --- a/crates/oxc_linter/tests/rule_configuration_test.rs +++ b/crates/oxc_linter/tests/rule_configuration_test.rs @@ -25,7 +25,6 @@ fn test_rule_default_matches_from_configuration_null() { // 1. The Default implementation returns the same values as from_configuration(null), or // 2. The from_configuration method is updated to return Default::default() when given null let exceptions = [ - "jest/prefer-lowercase-title", "react/jsx-filename-extension", "typescript/no-this-alias", "unicorn/prefer-object-from-entries",