diff --git a/crates/oxc_linter/src/rules/jest/no_large_snapshots.rs b/crates/oxc_linter/src/rules/jest/no_large_snapshots.rs index 2198fe24449bf..5397d97f1b51c 100644 --- a/crates/oxc_linter/src/rules/jest/no_large_snapshots.rs +++ b/crates/oxc_linter/src/rules/jest/no_large_snapshots.rs @@ -35,13 +35,19 @@ fn too_long_snapshot(line_limit: usize, line_count: usize, span: Span) -> OxcDia #[derive(Debug, Default, Clone)] pub struct NoLargeSnapshots(Box); -#[derive(Debug, Default, Clone)] +#[derive(Debug, Clone)] pub struct NoLargeSnapshotsConfig { pub max_size: usize, pub inline_max_size: usize, pub allowed_snapshots: FxHashMap>, } +impl Default for NoLargeSnapshotsConfig { + fn default() -> Self { + Self { max_size: 50, inline_max_size: 50, allowed_snapshots: FxHashMap::default() } + } +} + impl Deref for NoLargeSnapshots { type Target = NoLargeSnapshotsConfig; diff --git a/crates/oxc_linter/tests/rule_configuration_test.rs b/crates/oxc_linter/tests/rule_configuration_test.rs index 3824b63b01cc6..a77db06764267 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/no-large-snapshots", "jest/prefer-lowercase-title", "react/jsx-filename-extension", "typescript/no-this-alias",