diff --git a/crates/oxc_linter/src/rule.rs b/crates/oxc_linter/src/rule.rs index 71659fac3b185..b871dd8fc175d 100644 --- a/crates/oxc_linter/src/rule.rs +++ b/crates/oxc_linter/src/rule.rs @@ -83,7 +83,7 @@ pub trait Rule: Sized + Default + fmt::Debug { /// ```ignore /// impl Rule for MyRule { /// fn from_configuration(value: serde_json::Value) -> Self { -/// serde_json::from_value::>(value) +/// serde_json::from_value::>(value) /// .unwrap_or_default() /// .into_inner() /// } diff --git a/crates/oxc_linter/src/rules/eslint/accessor_pairs.rs b/crates/oxc_linter/src/rules/eslint/accessor_pairs.rs index d9d6b3f7636de..811615320254a 100644 --- a/crates/oxc_linter/src/rules/eslint/accessor_pairs.rs +++ b/crates/oxc_linter/src/rules/eslint/accessor_pairs.rs @@ -122,9 +122,7 @@ declare_oxc_lint!( impl Rule for AccessorPairs { fn from_configuration(value: serde_json::Value) -> Self { - serde_json::from_value::>(value) - .unwrap_or_default() - .into_inner() + serde_json::from_value::>(value).unwrap_or_default().into_inner() } fn run<'a>(&self, node: &AstNode<'a>, ctx: &LintContext<'a>) { diff --git a/crates/oxc_linter/src/rules/eslint/array_callback_return/mod.rs b/crates/oxc_linter/src/rules/eslint/array_callback_return/mod.rs index de1b2b34e75f2..b3da5f2b6f3db 100644 --- a/crates/oxc_linter/src/rules/eslint/array_callback_return/mod.rs +++ b/crates/oxc_linter/src/rules/eslint/array_callback_return/mod.rs @@ -82,9 +82,7 @@ declare_oxc_lint!( impl Rule for ArrayCallbackReturn { fn from_configuration(value: Value) -> Self { - serde_json::from_value::>(value) - .unwrap_or_default() - .into_inner() + serde_json::from_value::>(value).unwrap_or_default().into_inner() } fn run<'a>(&self, node: &AstNode<'a>, ctx: &LintContext<'a>) { diff --git a/crates/oxc_linter/src/rules/eslint/getter_return.rs b/crates/oxc_linter/src/rules/eslint/getter_return.rs index 4c08f7d16a3f3..19ceb11d7349d 100644 --- a/crates/oxc_linter/src/rules/eslint/getter_return.rs +++ b/crates/oxc_linter/src/rules/eslint/getter_return.rs @@ -90,9 +90,7 @@ declare_oxc_lint!( impl Rule for GetterReturn { fn from_configuration(value: Value) -> Self { - serde_json::from_value::>(value) - .unwrap_or_default() - .into_inner() + serde_json::from_value::>(value).unwrap_or_default().into_inner() } fn run<'a>(&self, node: &AstNode<'a>, ctx: &LintContext<'a>) { diff --git a/crates/oxc_linter/src/rules/eslint/max_classes_per_file.rs b/crates/oxc_linter/src/rules/eslint/max_classes_per_file.rs index b730e4be64569..6ac9be801e2b7 100644 --- a/crates/oxc_linter/src/rules/eslint/max_classes_per_file.rs +++ b/crates/oxc_linter/src/rules/eslint/max_classes_per_file.rs @@ -86,7 +86,7 @@ impl Rule for MaxClassesPerFile { { Self(Box::new(MaxClassesPerFileConfig { max, ignore_expressions: false })) } else { - serde_json::from_value::>(value) + serde_json::from_value::>(value) .unwrap_or_default() .into_inner() } diff --git a/crates/oxc_linter/src/rules/eslint/max_depth.rs b/crates/oxc_linter/src/rules/eslint/max_depth.rs index 5f9a5aa91e5d4..7de311723ffea 100644 --- a/crates/oxc_linter/src/rules/eslint/max_depth.rs +++ b/crates/oxc_linter/src/rules/eslint/max_depth.rs @@ -105,7 +105,7 @@ impl Rule for MaxDepth { { MaxDepth { max } } else { - serde_json::from_value::>(value) + serde_json::from_value::>(value) .unwrap_or_default() .into_inner() } diff --git a/crates/oxc_linter/src/rules/eslint/max_lines.rs b/crates/oxc_linter/src/rules/eslint/max_lines.rs index ceeedb7b59fbb..b1e9d881bf334 100644 --- a/crates/oxc_linter/src/rules/eslint/max_lines.rs +++ b/crates/oxc_linter/src/rules/eslint/max_lines.rs @@ -73,7 +73,7 @@ impl Rule for MaxLines { { Self(Box::new(MaxLinesConfig { max, skip_comments: false, skip_blank_lines: false })) } else { - serde_json::from_value::>(value) + serde_json::from_value::>(value) .unwrap_or_default() .into_inner() } diff --git a/crates/oxc_linter/src/rules/eslint/max_params.rs b/crates/oxc_linter/src/rules/eslint/max_params.rs index 2e4ce8b6eec63..b44ed4071537e 100644 --- a/crates/oxc_linter/src/rules/eslint/max_params.rs +++ b/crates/oxc_linter/src/rules/eslint/max_params.rs @@ -106,7 +106,7 @@ impl Rule for MaxParams { { Self(Box::new(MaxParamsConfig { max, count_void_this: false })) } else { - serde_json::from_value::>(value) + serde_json::from_value::>(value) .unwrap_or_default() .into_inner() } diff --git a/crates/oxc_linter/src/rules/eslint/no_bitwise.rs b/crates/oxc_linter/src/rules/eslint/no_bitwise.rs index f00dda859bf4e..966fc3ce976a2 100644 --- a/crates/oxc_linter/src/rules/eslint/no_bitwise.rs +++ b/crates/oxc_linter/src/rules/eslint/no_bitwise.rs @@ -99,9 +99,7 @@ declare_oxc_lint!( impl Rule for NoBitwise { fn from_configuration(value: Value) -> Self { - serde_json::from_value::>(value) - .unwrap_or_default() - .into_inner() + serde_json::from_value::>(value).unwrap_or_default().into_inner() } fn run<'a>(&self, node: &AstNode<'a>, ctx: &LintContext<'a>) { diff --git a/crates/oxc_linter/src/rules/eslint/no_cond_assign.rs b/crates/oxc_linter/src/rules/eslint/no_cond_assign.rs index 172df8dc0c26f..0c40348a9ea83 100644 --- a/crates/oxc_linter/src/rules/eslint/no_cond_assign.rs +++ b/crates/oxc_linter/src/rules/eslint/no_cond_assign.rs @@ -73,9 +73,7 @@ declare_oxc_lint!( impl Rule for NoCondAssign { fn from_configuration(value: serde_json::Value) -> Self { - serde_json::from_value::>(value) - .unwrap_or_default() - .into_inner() + serde_json::from_value::>(value).unwrap_or_default().into_inner() } fn run<'a>(&self, node: &AstNode<'a>, ctx: &LintContext<'a>) { diff --git a/crates/oxc_linter/src/rules/eslint/no_console.rs b/crates/oxc_linter/src/rules/eslint/no_console.rs index 7cdc9d4360052..556aaa22104f8 100644 --- a/crates/oxc_linter/src/rules/eslint/no_console.rs +++ b/crates/oxc_linter/src/rules/eslint/no_console.rs @@ -90,9 +90,7 @@ declare_oxc_lint!( impl Rule for NoConsole { fn from_configuration(value: serde_json::Value) -> Self { - serde_json::from_value::>(value) - .unwrap_or_default() - .into_inner() + serde_json::from_value::>(value).unwrap_or_default().into_inner() } fn run<'a>(&self, node: &AstNode<'a>, ctx: &LintContext<'a>) { diff --git a/crates/oxc_linter/src/rules/eslint/no_duplicate_imports.rs b/crates/oxc_linter/src/rules/eslint/no_duplicate_imports.rs index 394de10354687..97741a651218e 100644 --- a/crates/oxc_linter/src/rules/eslint/no_duplicate_imports.rs +++ b/crates/oxc_linter/src/rules/eslint/no_duplicate_imports.rs @@ -140,9 +140,7 @@ enum ModuleType { impl Rule for NoDuplicateImports { fn from_configuration(value: serde_json::Value) -> Self { - serde_json::from_value::>(value) - .unwrap_or_default() - .into_inner() + serde_json::from_value::>(value).unwrap_or_default().into_inner() } fn run_once(&self, ctx: &LintContext) { diff --git a/crates/oxc_linter/src/rules/eslint/no_else_return.rs b/crates/oxc_linter/src/rules/eslint/no_else_return.rs index cd5a11ecc00f9..118db82b18080 100644 --- a/crates/oxc_linter/src/rules/eslint/no_else_return.rs +++ b/crates/oxc_linter/src/rules/eslint/no_else_return.rs @@ -339,9 +339,7 @@ fn check_if_without_else(ctx: &LintContext, node: &AstNode) { impl Rule for NoElseReturn { fn from_configuration(value: serde_json::Value) -> Self { - serde_json::from_value::>(value) - .unwrap_or_default() - .into_inner() + serde_json::from_value::>(value).unwrap_or_default().into_inner() } fn run<'a>(&self, node: &AstNode<'a>, ctx: &LintContext<'a>) { diff --git a/crates/oxc_linter/src/rules/eslint/no_empty.rs b/crates/oxc_linter/src/rules/eslint/no_empty.rs index 684fe73371924..6629b5bf2db69 100644 --- a/crates/oxc_linter/src/rules/eslint/no_empty.rs +++ b/crates/oxc_linter/src/rules/eslint/no_empty.rs @@ -58,7 +58,7 @@ declare_oxc_lint!( impl Rule for NoEmpty { fn from_configuration(value: serde_json::Value) -> Self { - serde_json::from_value::>(value).unwrap_or_default().into_inner() + serde_json::from_value::>(value).unwrap_or_default().into_inner() } fn run<'a>(&self, node: &AstNode<'a>, ctx: &LintContext<'a>) { diff --git a/crates/oxc_linter/src/rules/eslint/no_eval.rs b/crates/oxc_linter/src/rules/eslint/no_eval.rs index dda37c09200c9..69dc7f401781c 100644 --- a/crates/oxc_linter/src/rules/eslint/no_eval.rs +++ b/crates/oxc_linter/src/rules/eslint/no_eval.rs @@ -94,7 +94,7 @@ declare_oxc_lint!( impl Rule for NoEval { fn from_configuration(value: serde_json::Value) -> Self { - serde_json::from_value::>(value).unwrap_or_default().into_inner() + serde_json::from_value::>(value).unwrap_or_default().into_inner() } fn run<'a>(&self, node: &AstNode<'a>, ctx: &LintContext<'a>) { diff --git a/crates/oxc_linter/src/rules/eslint/no_extend_native.rs b/crates/oxc_linter/src/rules/eslint/no_extend_native.rs index ee95a699bc701..8fdcd84b5908a 100644 --- a/crates/oxc_linter/src/rules/eslint/no_extend_native.rs +++ b/crates/oxc_linter/src/rules/eslint/no_extend_native.rs @@ -80,9 +80,7 @@ declare_oxc_lint!( impl Rule for NoExtendNative { fn from_configuration(value: serde_json::Value) -> Self { - serde_json::from_value::>(value) - .unwrap_or_default() - .into_inner() + serde_json::from_value::>(value).unwrap_or_default().into_inner() } fn run_once(&self, ctx: &LintContext) { diff --git a/crates/oxc_linter/src/rules/eslint/no_extra_boolean_cast.rs b/crates/oxc_linter/src/rules/eslint/no_extra_boolean_cast.rs index 65562a75a94dc..15c1c6bda6ced 100644 --- a/crates/oxc_linter/src/rules/eslint/no_extra_boolean_cast.rs +++ b/crates/oxc_linter/src/rules/eslint/no_extra_boolean_cast.rs @@ -87,9 +87,7 @@ declare_oxc_lint!( impl Rule for NoExtraBooleanCast { fn from_configuration(value: serde_json::Value) -> Self { - serde_json::from_value::>(value) - .unwrap_or_default() - .into_inner() + serde_json::from_value::>(value).unwrap_or_default().into_inner() } fn run<'a>(&self, node: &AstNode<'a>, ctx: &LintContext<'a>) { diff --git a/crates/oxc_linter/src/rules/eslint/no_global_assign.rs b/crates/oxc_linter/src/rules/eslint/no_global_assign.rs index 436a14c047763..4043aad3d9a53 100644 --- a/crates/oxc_linter/src/rules/eslint/no_global_assign.rs +++ b/crates/oxc_linter/src/rules/eslint/no_global_assign.rs @@ -57,9 +57,7 @@ declare_oxc_lint!( impl Rule for NoGlobalAssign { fn from_configuration(value: serde_json::Value) -> Self { - serde_json::from_value::>(value) - .unwrap_or_default() - .into_inner() + serde_json::from_value::>(value).unwrap_or_default().into_inner() } fn run_once(&self, ctx: &LintContext) { diff --git a/crates/oxc_linter/src/rules/eslint/no_implicit_coercion.rs b/crates/oxc_linter/src/rules/eslint/no_implicit_coercion.rs index 671a5450bb438..cde5028c63943 100644 --- a/crates/oxc_linter/src/rules/eslint/no_implicit_coercion.rs +++ b/crates/oxc_linter/src/rules/eslint/no_implicit_coercion.rs @@ -180,9 +180,7 @@ declare_oxc_lint!( impl Rule for NoImplicitCoercion { fn from_configuration(value: serde_json::Value) -> Self { - serde_json::from_value::>(value) - .unwrap_or_default() - .into_inner() + serde_json::from_value::>(value).unwrap_or_default().into_inner() } fn run<'a>(&self, node: &AstNode<'a>, ctx: &LintContext<'a>) { diff --git a/crates/oxc_linter/src/rules/eslint/no_invalid_regexp.rs b/crates/oxc_linter/src/rules/eslint/no_invalid_regexp.rs index f0278ae177600..aa1d11f56ef0f 100644 --- a/crates/oxc_linter/src/rules/eslint/no_invalid_regexp.rs +++ b/crates/oxc_linter/src/rules/eslint/no_invalid_regexp.rs @@ -71,9 +71,7 @@ struct NoInvalidRegexpConfig { impl Rule for NoInvalidRegexp { fn from_configuration(value: serde_json::Value) -> Self { - serde_json::from_value::>(value) - .unwrap_or_default() - .into_inner() + serde_json::from_value::>(value).unwrap_or_default().into_inner() } fn run<'a>(&self, node: &AstNode<'a>, ctx: &LintContext<'a>) { diff --git a/crates/oxc_linter/src/rules/eslint/no_labels.rs b/crates/oxc_linter/src/rules/eslint/no_labels.rs index 6959c27540ed6..70ee7b6a496d5 100644 --- a/crates/oxc_linter/src/rules/eslint/no_labels.rs +++ b/crates/oxc_linter/src/rules/eslint/no_labels.rs @@ -120,9 +120,7 @@ declare_oxc_lint!( impl Rule for NoLabels { fn from_configuration(value: serde_json::Value) -> Self { - serde_json::from_value::>(value) - .unwrap_or_default() - .into_inner() + serde_json::from_value::>(value).unwrap_or_default().into_inner() } fn run<'a>(&self, node: &AstNode<'a>, ctx: &LintContext<'a>) { diff --git a/crates/oxc_linter/src/rules/eslint/no_misleading_character_class.rs b/crates/oxc_linter/src/rules/eslint/no_misleading_character_class.rs index c45303ac9a504..da89bfc516f4f 100644 --- a/crates/oxc_linter/src/rules/eslint/no_misleading_character_class.rs +++ b/crates/oxc_linter/src/rules/eslint/no_misleading_character_class.rs @@ -150,9 +150,7 @@ impl<'ast> Visit<'ast> for CharacterSequenceCollector<'ast> { impl Rule for NoMisleadingCharacterClass { fn from_configuration(value: serde_json::Value) -> Self { - serde_json::from_value::>(value) - .unwrap_or_default() - .into_inner() + serde_json::from_value::>(value).unwrap_or_default().into_inner() } fn run<'a>(&self, node: &AstNode<'a>, ctx: &LintContext<'a>) { diff --git a/crates/oxc_linter/src/rules/eslint/no_multi_assign.rs b/crates/oxc_linter/src/rules/eslint/no_multi_assign.rs index 9c4ae6777db0c..49de09484b075 100644 --- a/crates/oxc_linter/src/rules/eslint/no_multi_assign.rs +++ b/crates/oxc_linter/src/rules/eslint/no_multi_assign.rs @@ -109,9 +109,7 @@ declare_oxc_lint!( impl Rule for NoMultiAssign { fn from_configuration(value: serde_json::Value) -> Self { - serde_json::from_value::>(value) - .unwrap_or_default() - .into_inner() + serde_json::from_value::>(value).unwrap_or_default().into_inner() } fn run<'a>(&self, node: &AstNode<'a>, ctx: &LintContext<'a>) { diff --git a/crates/oxc_linter/src/rules/eslint/no_plusplus.rs b/crates/oxc_linter/src/rules/eslint/no_plusplus.rs index 1a193f6350df4..42cb2c972aeff 100644 --- a/crates/oxc_linter/src/rules/eslint/no_plusplus.rs +++ b/crates/oxc_linter/src/rules/eslint/no_plusplus.rs @@ -95,9 +95,7 @@ declare_oxc_lint!( impl Rule for NoPlusplus { fn from_configuration(value: serde_json::Value) -> Self { - serde_json::from_value::>(value) - .unwrap_or_default() - .into_inner() + serde_json::from_value::>(value).unwrap_or_default().into_inner() } fn run<'a>(&self, node: &AstNode<'a>, ctx: &LintContext<'a>) { diff --git a/crates/oxc_linter/src/rules/eslint/no_promise_executor_return.rs b/crates/oxc_linter/src/rules/eslint/no_promise_executor_return.rs index dfece55be99b6..d584807f4f1ff 100644 --- a/crates/oxc_linter/src/rules/eslint/no_promise_executor_return.rs +++ b/crates/oxc_linter/src/rules/eslint/no_promise_executor_return.rs @@ -121,9 +121,7 @@ declare_oxc_lint!( impl Rule for NoPromiseExecutorReturn { fn from_configuration(value: serde_json::Value) -> Self { - serde_json::from_value::>(value) - .unwrap_or_default() - .into_inner() + serde_json::from_value::>(value).unwrap_or_default().into_inner() } fn run<'a>(&self, node: &AstNode<'a>, ctx: &LintContext<'a>) { diff --git a/crates/oxc_linter/src/rules/eslint/no_redeclare.rs b/crates/oxc_linter/src/rules/eslint/no_redeclare.rs index da547428bcf24..7b430de28a3af 100644 --- a/crates/oxc_linter/src/rules/eslint/no_redeclare.rs +++ b/crates/oxc_linter/src/rules/eslint/no_redeclare.rs @@ -68,9 +68,7 @@ declare_oxc_lint!( impl Rule for NoRedeclare { fn from_configuration(value: serde_json::Value) -> Self { - serde_json::from_value::>(value) - .unwrap_or_default() - .into_inner() + serde_json::from_value::>(value).unwrap_or_default().into_inner() } fn run_once(&self, ctx: &LintContext) { diff --git a/crates/oxc_linter/src/rules/eslint/no_return_assign.rs b/crates/oxc_linter/src/rules/eslint/no_return_assign.rs index e20fd3eaa4838..f00ce8a571517 100644 --- a/crates/oxc_linter/src/rules/eslint/no_return_assign.rs +++ b/crates/oxc_linter/src/rules/eslint/no_return_assign.rs @@ -73,9 +73,7 @@ fn is_sentinel_node(ast_kind: AstKind) -> bool { impl Rule for NoReturnAssign { fn from_configuration(value: Value) -> Self { - serde_json::from_value::>(value) - .unwrap_or_default() - .into_inner() + serde_json::from_value::>(value).unwrap_or_default().into_inner() } fn run<'a>(&self, node: &AstNode<'a>, ctx: &LintContext<'a>) { diff --git a/crates/oxc_linter/src/rules/eslint/no_self_assign.rs b/crates/oxc_linter/src/rules/eslint/no_self_assign.rs index 5551e08755f78..74f88dc697361 100644 --- a/crates/oxc_linter/src/rules/eslint/no_self_assign.rs +++ b/crates/oxc_linter/src/rules/eslint/no_self_assign.rs @@ -104,9 +104,7 @@ declare_oxc_lint!( impl Rule for NoSelfAssign { fn from_configuration(value: serde_json::Value) -> Self { - serde_json::from_value::>(value) - .unwrap_or_default() - .into_inner() + serde_json::from_value::>(value).unwrap_or_default().into_inner() } fn run<'a>(&self, node: &AstNode<'a>, ctx: &LintContext<'a>) { diff --git a/crates/oxc_linter/src/rules/eslint/no_shadow_restricted_names.rs b/crates/oxc_linter/src/rules/eslint/no_shadow_restricted_names.rs index 9d9d544838a4e..a8d0de4a09221 100644 --- a/crates/oxc_linter/src/rules/eslint/no_shadow_restricted_names.rs +++ b/crates/oxc_linter/src/rules/eslint/no_shadow_restricted_names.rs @@ -91,9 +91,7 @@ declare_oxc_lint!( impl Rule for NoShadowRestrictedNames { fn from_configuration(value: Value) -> Self { - serde_json::from_value::>(value) - .unwrap_or_default() - .into_inner() + serde_json::from_value::>(value).unwrap_or_default().into_inner() } fn run_once(&self, ctx: &LintContext) { diff --git a/crates/oxc_linter/src/rules/eslint/no_undef.rs b/crates/oxc_linter/src/rules/eslint/no_undef.rs index 53332162d7d63..70c0f146a5135 100644 --- a/crates/oxc_linter/src/rules/eslint/no_undef.rs +++ b/crates/oxc_linter/src/rules/eslint/no_undef.rs @@ -53,7 +53,7 @@ declare_oxc_lint!( impl Rule for NoUndef { fn from_configuration(value: serde_json::Value) -> Self { - serde_json::from_value::>(value).unwrap_or_default().into_inner() + serde_json::from_value::>(value).unwrap_or_default().into_inner() } fn run_once(&self, ctx: &LintContext) { diff --git a/crates/oxc_linter/src/rules/eslint/no_unneeded_ternary.rs b/crates/oxc_linter/src/rules/eslint/no_unneeded_ternary.rs index 3d26b53460147..745b94e3c105e 100644 --- a/crates/oxc_linter/src/rules/eslint/no_unneeded_ternary.rs +++ b/crates/oxc_linter/src/rules/eslint/no_unneeded_ternary.rs @@ -81,9 +81,7 @@ declare_oxc_lint!( impl Rule for NoUnneededTernary { fn from_configuration(value: serde_json::Value) -> Self { - serde_json::from_value::>(value) - .unwrap_or_default() - .into_inner() + serde_json::from_value::>(value).unwrap_or_default().into_inner() } fn run<'a>(&self, node: &AstNode<'a>, ctx: &LintContext<'a>) { diff --git a/crates/oxc_linter/src/rules/eslint/no_unsafe_negation.rs b/crates/oxc_linter/src/rules/eslint/no_unsafe_negation.rs index dbed06370e604..a2b692c8e9095 100644 --- a/crates/oxc_linter/src/rules/eslint/no_unsafe_negation.rs +++ b/crates/oxc_linter/src/rules/eslint/no_unsafe_negation.rs @@ -73,9 +73,7 @@ declare_oxc_lint!( impl Rule for NoUnsafeNegation { fn from_configuration(value: serde_json::Value) -> Self { - serde_json::from_value::>(value) - .unwrap_or_default() - .into_inner() + serde_json::from_value::>(value).unwrap_or_default().into_inner() } fn run<'a>(&self, node: &AstNode<'a>, ctx: &LintContext<'a>) { diff --git a/crates/oxc_linter/src/rules/eslint/no_unsafe_optional_chaining.rs b/crates/oxc_linter/src/rules/eslint/no_unsafe_optional_chaining.rs index 42eb3bff532fc..acacd83b4a7a2 100644 --- a/crates/oxc_linter/src/rules/eslint/no_unsafe_optional_chaining.rs +++ b/crates/oxc_linter/src/rules/eslint/no_unsafe_optional_chaining.rs @@ -65,9 +65,7 @@ declare_oxc_lint!( impl Rule for NoUnsafeOptionalChaining { fn from_configuration(value: serde_json::Value) -> Self { - serde_json::from_value::>(value) - .unwrap_or_default() - .into_inner() + serde_json::from_value::>(value).unwrap_or_default().into_inner() } fn run<'a>(&self, node: &AstNode<'a>, ctx: &LintContext<'a>) { diff --git a/crates/oxc_linter/src/rules/eslint/no_unused_expressions.rs b/crates/oxc_linter/src/rules/eslint/no_unused_expressions.rs index dc9b539a6265c..22a3871ddcc49 100644 --- a/crates/oxc_linter/src/rules/eslint/no_unused_expressions.rs +++ b/crates/oxc_linter/src/rules/eslint/no_unused_expressions.rs @@ -80,9 +80,7 @@ impl Rule for NoUnusedExpressions { } fn from_configuration(value: Value) -> Self { - serde_json::from_value::>(value) - .unwrap_or_default() - .into_inner() + serde_json::from_value::>(value).unwrap_or_default().into_inner() } } diff --git a/crates/oxc_linter/src/rules/eslint/no_useless_computed_key.rs b/crates/oxc_linter/src/rules/eslint/no_useless_computed_key.rs index e99584349aeb7..6b2b088c09779 100644 --- a/crates/oxc_linter/src/rules/eslint/no_useless_computed_key.rs +++ b/crates/oxc_linter/src/rules/eslint/no_useless_computed_key.rs @@ -119,9 +119,7 @@ declare_oxc_lint!( impl Rule for NoUselessComputedKey { fn from_configuration(value: Value) -> Self { - serde_json::from_value::>(value) - .unwrap_or_default() - .into_inner() + serde_json::from_value::>(value).unwrap_or_default().into_inner() } fn run<'a>(&self, node: &AstNode<'a>, ctx: &LintContext<'a>) { diff --git a/crates/oxc_linter/src/rules/eslint/no_useless_rename.rs b/crates/oxc_linter/src/rules/eslint/no_useless_rename.rs index 5c69da7f899d5..9cda4da74ab13 100644 --- a/crates/oxc_linter/src/rules/eslint/no_useless_rename.rs +++ b/crates/oxc_linter/src/rules/eslint/no_useless_rename.rs @@ -76,9 +76,7 @@ declare_oxc_lint!( impl Rule for NoUselessRename { fn from_configuration(value: serde_json::Value) -> Self { - serde_json::from_value::>(value) - .unwrap_or_default() - .into_inner() + serde_json::from_value::>(value).unwrap_or_default().into_inner() } fn run<'a>(&self, node: &AstNode<'a>, ctx: &LintContext<'a>) { diff --git a/crates/oxc_linter/src/rules/eslint/no_void.rs b/crates/oxc_linter/src/rules/eslint/no_void.rs index fa142b99fc131..827d22f62860f 100644 --- a/crates/oxc_linter/src/rules/eslint/no_void.rs +++ b/crates/oxc_linter/src/rules/eslint/no_void.rs @@ -59,7 +59,7 @@ declare_oxc_lint!( impl Rule for NoVoid { fn from_configuration(value: serde_json::Value) -> Self { - serde_json::from_value::>(value).unwrap_or_default().into_inner() + serde_json::from_value::>(value).unwrap_or_default().into_inner() } fn run<'a>(&self, node: &AstNode<'a>, ctx: &LintContext<'a>) { diff --git a/crates/oxc_linter/src/rules/eslint/prefer_promise_reject_errors.rs b/crates/oxc_linter/src/rules/eslint/prefer_promise_reject_errors.rs index a33992fdb88f5..4b8bd29321c27 100644 --- a/crates/oxc_linter/src/rules/eslint/prefer_promise_reject_errors.rs +++ b/crates/oxc_linter/src/rules/eslint/prefer_promise_reject_errors.rs @@ -82,9 +82,7 @@ declare_oxc_lint!( impl Rule for PreferPromiseRejectErrors { fn from_configuration(value: Value) -> Self { - serde_json::from_value::>(value) - .unwrap_or_default() - .into_inner() + serde_json::from_value::>(value).unwrap_or_default().into_inner() } fn run<'a>(&self, node: &AstNode<'a>, ctx: &LintContext<'a>) { diff --git a/crates/oxc_linter/src/rules/eslint/preserve_caught_error.rs b/crates/oxc_linter/src/rules/eslint/preserve_caught_error.rs index 21e79ef7d0c73..2e29706c2cc93 100644 --- a/crates/oxc_linter/src/rules/eslint/preserve_caught_error.rs +++ b/crates/oxc_linter/src/rules/eslint/preserve_caught_error.rs @@ -305,9 +305,7 @@ impl PreserveCaughtError { impl Rule for PreserveCaughtError { fn from_configuration(value: serde_json::Value) -> Self { - serde_json::from_value::>(value) - .unwrap_or_default() - .into_inner() + serde_json::from_value::>(value).unwrap_or_default().into_inner() } fn run<'a>(&self, node: &AstNode<'a>, ctx: &LintContext<'a>) { diff --git a/crates/oxc_linter/src/rules/eslint/radix.rs b/crates/oxc_linter/src/rules/eslint/radix.rs index a54a5d9e8be08..fbd9358470938 100644 --- a/crates/oxc_linter/src/rules/eslint/radix.rs +++ b/crates/oxc_linter/src/rules/eslint/radix.rs @@ -86,7 +86,7 @@ declare_oxc_lint!( impl Rule for Radix { fn from_configuration(value: Value) -> Self { - serde_json::from_value::>(value).unwrap_or_default().into_inner() + serde_json::from_value::>(value).unwrap_or_default().into_inner() } fn run<'a>(&self, node: &AstNode<'a>, ctx: &LintContext<'a>) { diff --git a/crates/oxc_linter/src/rules/eslint/unicode_bom.rs b/crates/oxc_linter/src/rules/eslint/unicode_bom.rs index ef50cc4d5f86a..fa05e2c51cf6e 100644 --- a/crates/oxc_linter/src/rules/eslint/unicode_bom.rs +++ b/crates/oxc_linter/src/rules/eslint/unicode_bom.rs @@ -63,9 +63,7 @@ declare_oxc_lint!( impl Rule for UnicodeBom { fn from_configuration(value: serde_json::Value) -> Self { - serde_json::from_value::>(value) - .unwrap_or_default() - .into_inner() + serde_json::from_value::>(value).unwrap_or_default().into_inner() } fn run_once(&self, ctx: &LintContext) { diff --git a/crates/oxc_linter/src/rules/eslint/use_isnan.rs b/crates/oxc_linter/src/rules/eslint/use_isnan.rs index 71c8dd92d6434..33788e1cd19d1 100644 --- a/crates/oxc_linter/src/rules/eslint/use_isnan.rs +++ b/crates/oxc_linter/src/rules/eslint/use_isnan.rs @@ -144,9 +144,7 @@ impl Rule for UseIsnan { } fn from_configuration(value: serde_json::Value) -> Self { - serde_json::from_value::>(value) - .unwrap_or_default() - .into_inner() + serde_json::from_value::>(value).unwrap_or_default().into_inner() } } diff --git a/crates/oxc_linter/src/rules/eslint/valid_typeof.rs b/crates/oxc_linter/src/rules/eslint/valid_typeof.rs index 385e01018a3b8..efa4986fffc3f 100644 --- a/crates/oxc_linter/src/rules/eslint/valid_typeof.rs +++ b/crates/oxc_linter/src/rules/eslint/valid_typeof.rs @@ -159,9 +159,7 @@ impl Rule for ValidTypeof { } fn from_configuration(value: serde_json::Value) -> Self { - serde_json::from_value::>(value) - .unwrap_or_default() - .into_inner() + serde_json::from_value::>(value).unwrap_or_default().into_inner() } } diff --git a/crates/oxc_linter/src/rules/import/consistent_type_specifier_style.rs b/crates/oxc_linter/src/rules/import/consistent_type_specifier_style.rs index bff12016653c2..4db9123fbc0a7 100644 --- a/crates/oxc_linter/src/rules/import/consistent_type_specifier_style.rs +++ b/crates/oxc_linter/src/rules/import/consistent_type_specifier_style.rs @@ -101,10 +101,9 @@ declare_oxc_lint!( impl Rule for ConsistentTypeSpecifierStyle { fn from_configuration(value: Value) -> Self { - serde_json::from_value::>(value) - .unwrap_or_default() - .into_inner() + serde_json::from_value::>(value).unwrap_or_default().into_inner() } + fn run<'a>(&self, node: &AstNode<'a>, ctx: &LintContext<'a>) { let AstKind::ImportDeclaration(import_decl) = node.kind() else { return; diff --git a/crates/oxc_linter/src/rules/import/first.rs b/crates/oxc_linter/src/rules/import/first.rs index 287ec375c5281..8a9acd69f7b30 100644 --- a/crates/oxc_linter/src/rules/import/first.rs +++ b/crates/oxc_linter/src/rules/import/first.rs @@ -91,7 +91,7 @@ fn is_relative_path(path: &str) -> bool { /// impl Rule for First { fn from_configuration(value: serde_json::Value) -> Self { - serde_json::from_value::>(value).unwrap_or_default().into_inner() + serde_json::from_value::>(value).unwrap_or_default().into_inner() } fn run_once(&self, ctx: &LintContext<'_>) { diff --git a/crates/oxc_linter/src/rules/import/max_dependencies.rs b/crates/oxc_linter/src/rules/import/max_dependencies.rs index 2aeaf11a352f9..2a6f6a160762f 100644 --- a/crates/oxc_linter/src/rules/import/max_dependencies.rs +++ b/crates/oxc_linter/src/rules/import/max_dependencies.rs @@ -91,7 +91,7 @@ impl Rule for MaxDependencies { { Self(Box::new(MaxDependenciesConfig { max, ignore_type_imports: false })) } else { - serde_json::from_value::>(value) + serde_json::from_value::>(value) .unwrap_or_default() .into_inner() } diff --git a/crates/oxc_linter/src/rules/import/namespace.rs b/crates/oxc_linter/src/rules/import/namespace.rs index f04300ae56bcd..2ff96ceb1db73 100644 --- a/crates/oxc_linter/src/rules/import/namespace.rs +++ b/crates/oxc_linter/src/rules/import/namespace.rs @@ -113,9 +113,7 @@ declare_oxc_lint!( impl Rule for Namespace { fn from_configuration(value: serde_json::Value) -> Self { - serde_json::from_value::>(value) - .unwrap_or_default() - .into_inner() + serde_json::from_value::>(value).unwrap_or_default().into_inner() } fn run_once(&self, ctx: &LintContext<'_>) { diff --git a/crates/oxc_linter/src/rules/import/no_absolute_path.rs b/crates/oxc_linter/src/rules/import/no_absolute_path.rs index c87da4fe917ad..8b3c6dec8b84b 100644 --- a/crates/oxc_linter/src/rules/import/no_absolute_path.rs +++ b/crates/oxc_linter/src/rules/import/no_absolute_path.rs @@ -108,9 +108,7 @@ declare_oxc_lint!( impl Rule for NoAbsolutePath { fn from_configuration(value: Value) -> Self { - serde_json::from_value::>(value) - .unwrap_or_default() - .into_inner() + serde_json::from_value::>(value).unwrap_or_default().into_inner() } fn run<'a>(&self, node: &AstNode<'a>, ctx: &LintContext<'a>) { diff --git a/crates/oxc_linter/src/rules/import/no_anonymous_default_export.rs b/crates/oxc_linter/src/rules/import/no_anonymous_default_export.rs index c16a70eab0bc1..fe7dd67b4c41b 100644 --- a/crates/oxc_linter/src/rules/import/no_anonymous_default_export.rs +++ b/crates/oxc_linter/src/rules/import/no_anonymous_default_export.rs @@ -122,9 +122,7 @@ declare_oxc_lint!( impl Rule for NoAnonymousDefaultExport { fn from_configuration(value: Value) -> Self { - serde_json::from_value::>(value) - .unwrap_or_default() - .into_inner() + serde_json::from_value::>(value).unwrap_or_default().into_inner() } fn run<'a>(&self, node: &AstNode<'a>, ctx: &LintContext<'a>) { diff --git a/crates/oxc_linter/src/rules/import/no_commonjs.rs b/crates/oxc_linter/src/rules/import/no_commonjs.rs index 33201ad6a568f..57f9efe9df301 100644 --- a/crates/oxc_linter/src/rules/import/no_commonjs.rs +++ b/crates/oxc_linter/src/rules/import/no_commonjs.rs @@ -130,9 +130,7 @@ fn is_conditional(parent_node: &AstNode, ctx: &LintContext) -> bool { /// impl Rule for NoCommonjs { fn from_configuration(value: serde_json::Value) -> Self { - serde_json::from_value::>(value) - .unwrap_or_default() - .into_inner() + serde_json::from_value::>(value).unwrap_or_default().into_inner() } fn run<'a>(&self, node: &AstNode<'a>, ctx: &LintContext<'a>) { diff --git a/crates/oxc_linter/src/rules/import/no_cycle.rs b/crates/oxc_linter/src/rules/import/no_cycle.rs index 6ce5239eaef4f..274aa647e071e 100644 --- a/crates/oxc_linter/src/rules/import/no_cycle.rs +++ b/crates/oxc_linter/src/rules/import/no_cycle.rs @@ -95,7 +95,7 @@ declare_oxc_lint!( impl Rule for NoCycle { fn from_configuration(value: serde_json::Value) -> Self { - serde_json::from_value::>(value).unwrap_or_default().into_inner() + serde_json::from_value::>(value).unwrap_or_default().into_inner() } fn run_once(&self, ctx: &LintContext<'_>) { diff --git a/crates/oxc_linter/src/rules/import/no_duplicates.rs b/crates/oxc_linter/src/rules/import/no_duplicates.rs index c60b2ab3f8ba6..d01f8a44a6b48 100644 --- a/crates/oxc_linter/src/rules/import/no_duplicates.rs +++ b/crates/oxc_linter/src/rules/import/no_duplicates.rs @@ -93,9 +93,7 @@ declare_oxc_lint!( impl Rule for NoDuplicates { fn from_configuration(value: serde_json::Value) -> Self { - serde_json::from_value::>(value) - .unwrap_or_default() - .into_inner() + serde_json::from_value::>(value).unwrap_or_default().into_inner() } fn run_once(&self, ctx: &LintContext<'_>) { diff --git a/crates/oxc_linter/src/rules/import/no_dynamic_require.rs b/crates/oxc_linter/src/rules/import/no_dynamic_require.rs index 67f7cfefcd523..70ff946b4bca5 100644 --- a/crates/oxc_linter/src/rules/import/no_dynamic_require.rs +++ b/crates/oxc_linter/src/rules/import/no_dynamic_require.rs @@ -58,9 +58,7 @@ declare_oxc_lint!( impl Rule for NoDynamicRequire { fn from_configuration(value: serde_json::Value) -> Self { - serde_json::from_value::>(value) - .unwrap_or_default() - .into_inner() + serde_json::from_value::>(value).unwrap_or_default().into_inner() } fn run<'a>(&self, node: &AstNode<'a>, ctx: &LintContext<'a>) { diff --git a/crates/oxc_linter/src/rules/import/no_namespace.rs b/crates/oxc_linter/src/rules/import/no_namespace.rs index caa9b6efab094..e5764ec859b30 100644 --- a/crates/oxc_linter/src/rules/import/no_namespace.rs +++ b/crates/oxc_linter/src/rules/import/no_namespace.rs @@ -84,9 +84,7 @@ declare_oxc_lint!( /// impl Rule for NoNamespace { fn from_configuration(value: serde_json::Value) -> Self { - serde_json::from_value::>(value) - .unwrap_or_default() - .into_inner() + serde_json::from_value::>(value).unwrap_or_default().into_inner() } fn run_once(&self, ctx: &LintContext<'_>) { diff --git a/crates/oxc_linter/src/rules/import/no_unassigned_import.rs b/crates/oxc_linter/src/rules/import/no_unassigned_import.rs index e92e41cca89e7..1bd19116e6283 100644 --- a/crates/oxc_linter/src/rules/import/no_unassigned_import.rs +++ b/crates/oxc_linter/src/rules/import/no_unassigned_import.rs @@ -84,9 +84,7 @@ declare_oxc_lint!( impl Rule for NoUnassignedImport { fn from_configuration(value: Value) -> Self { - serde_json::from_value::>(value) - .unwrap_or_default() - .into_inner() + serde_json::from_value::>(value).unwrap_or_default().into_inner() } fn run<'a>(&self, node: &AstNode<'a>, ctx: &LintContext<'a>) { diff --git a/crates/oxc_linter/src/rules/import/prefer_default_export.rs b/crates/oxc_linter/src/rules/import/prefer_default_export.rs index 7764536d247b9..7f8825033871a 100644 --- a/crates/oxc_linter/src/rules/import/prefer_default_export.rs +++ b/crates/oxc_linter/src/rules/import/prefer_default_export.rs @@ -79,9 +79,7 @@ declare_oxc_lint!( impl Rule for PreferDefaultExport { fn from_configuration(value: Value) -> Self { - serde_json::from_value::>(value) - .unwrap_or_default() - .into_inner() + serde_json::from_value::>(value).unwrap_or_default().into_inner() } fn run_once(&self, ctx: &LintContext<'_>) { diff --git a/crates/oxc_linter/src/rules/jest/max_expects.rs b/crates/oxc_linter/src/rules/jest/max_expects.rs index b273536b44ecc..9224dd0be0d1a 100644 --- a/crates/oxc_linter/src/rules/jest/max_expects.rs +++ b/crates/oxc_linter/src/rules/jest/max_expects.rs @@ -84,9 +84,7 @@ declare_oxc_lint!( impl Rule for MaxExpects { fn from_configuration(value: serde_json::Value) -> Self { - serde_json::from_value::>(value) - .unwrap_or_default() - .into_inner() + serde_json::from_value::>(value).unwrap_or_default().into_inner() } fn run_once(&self, ctx: &LintContext) { diff --git a/crates/oxc_linter/src/rules/jest/max_nested_describe.rs b/crates/oxc_linter/src/rules/jest/max_nested_describe.rs index a40ede13b2088..352700f44b735 100644 --- a/crates/oxc_linter/src/rules/jest/max_nested_describe.rs +++ b/crates/oxc_linter/src/rules/jest/max_nested_describe.rs @@ -139,9 +139,7 @@ declare_oxc_lint!( impl Rule for MaxNestedDescribe { fn from_configuration(value: serde_json::Value) -> Self { - serde_json::from_value::>(value) - .unwrap_or_default() - .into_inner() + serde_json::from_value::>(value).unwrap_or_default().into_inner() } fn run_once(&self, ctx: &LintContext) { diff --git a/crates/oxc_linter/src/rules/jest/no_hooks.rs b/crates/oxc_linter/src/rules/jest/no_hooks.rs index 93d599aeca309..13d9a5475ecc1 100644 --- a/crates/oxc_linter/src/rules/jest/no_hooks.rs +++ b/crates/oxc_linter/src/rules/jest/no_hooks.rs @@ -102,7 +102,7 @@ declare_oxc_lint!( impl Rule for NoHooks { fn from_configuration(value: serde_json::Value) -> Self { - serde_json::from_value::>(value).unwrap_or_default().into_inner() + serde_json::from_value::>(value).unwrap_or_default().into_inner() } fn run_on_jest_node<'a, 'c>( diff --git a/crates/oxc_linter/src/rules/jest/no_standalone_expect/mod.rs b/crates/oxc_linter/src/rules/jest/no_standalone_expect/mod.rs index b76b75a239532..f87ebb780d966 100644 --- a/crates/oxc_linter/src/rules/jest/no_standalone_expect/mod.rs +++ b/crates/oxc_linter/src/rules/jest/no_standalone_expect/mod.rs @@ -90,9 +90,7 @@ declare_oxc_lint!( impl Rule for NoStandaloneExpect { fn from_configuration(value: serde_json::Value) -> Self { - serde_json::from_value::>(value) - .unwrap_or_default() - .into_inner() + serde_json::from_value::>(value).unwrap_or_default().into_inner() } fn run_once(&self, ctx: &LintContext<'_>) { 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 453c9eacbfc6f..af269cdd5b47e 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 @@ -171,9 +171,7 @@ declare_oxc_lint!( impl Rule for PreferLowercaseTitle { fn from_configuration(value: serde_json::Value) -> Self { - serde_json::from_value::>(value) - .unwrap_or_default() - .into_inner() + serde_json::from_value::>(value).unwrap_or_default().into_inner() } fn run_on_jest_node<'a, 'c>( diff --git a/crates/oxc_linter/src/rules/jest/require_hook.rs b/crates/oxc_linter/src/rules/jest/require_hook.rs index e2f907a43f497..f29655905e3a7 100644 --- a/crates/oxc_linter/src/rules/jest/require_hook.rs +++ b/crates/oxc_linter/src/rules/jest/require_hook.rs @@ -178,9 +178,7 @@ declare_oxc_lint!( impl Rule for RequireHook { fn from_configuration(value: serde_json::Value) -> Self { - serde_json::from_value::>(value) - .unwrap_or_default() - .into_inner() + serde_json::from_value::>(value).unwrap_or_default().into_inner() } fn run<'a>(&self, node: &AstNode<'a>, ctx: &LintContext<'a>) { diff --git a/crates/oxc_linter/src/rules/jest/require_top_level_describe.rs b/crates/oxc_linter/src/rules/jest/require_top_level_describe.rs index d1ab52c1bcacb..324f8caae6b2e 100644 --- a/crates/oxc_linter/src/rules/jest/require_top_level_describe.rs +++ b/crates/oxc_linter/src/rules/jest/require_top_level_describe.rs @@ -119,9 +119,7 @@ declare_oxc_lint!( impl Rule for RequireTopLevelDescribe { fn from_configuration(value: serde_json::Value) -> Self { - serde_json::from_value::>(value) - .unwrap_or_default() - .into_inner() + serde_json::from_value::>(value).unwrap_or_default().into_inner() } fn run_once(&self, ctx: &LintContext) { diff --git a/crates/oxc_linter/src/rules/jsdoc/check_tag_names.rs b/crates/oxc_linter/src/rules/jsdoc/check_tag_names.rs index 5b6581e0e6ec6..687b3a918ceca 100644 --- a/crates/oxc_linter/src/rules/jsdoc/check_tag_names.rs +++ b/crates/oxc_linter/src/rules/jsdoc/check_tag_names.rs @@ -232,9 +232,7 @@ const OUTSIDE_AMBIENT_INVALID_TAGS_IF_TYPED: [&str; 27] = [ impl Rule for CheckTagNames { fn from_configuration(value: serde_json::Value) -> Self { - serde_json::from_value::>(value) - .unwrap_or_default() - .into_inner() + serde_json::from_value::>(value).unwrap_or_default().into_inner() } fn run_once(&self, ctx: &LintContext) { diff --git a/crates/oxc_linter/src/rules/jsdoc/empty_tags.rs b/crates/oxc_linter/src/rules/jsdoc/empty_tags.rs index 2c32f1bf00e93..8c81df90fbfda 100644 --- a/crates/oxc_linter/src/rules/jsdoc/empty_tags.rs +++ b/crates/oxc_linter/src/rules/jsdoc/empty_tags.rs @@ -96,9 +96,7 @@ struct EmptyTagsConfig { impl Rule for EmptyTags { fn from_configuration(value: serde_json::Value) -> Self { - serde_json::from_value::>(value) - .unwrap_or_default() - .into_inner() + serde_json::from_value::>(value).unwrap_or_default().into_inner() } fn run_once(&self, ctx: &LintContext) { diff --git a/crates/oxc_linter/src/rules/jsdoc/no_defaults.rs b/crates/oxc_linter/src/rules/jsdoc/no_defaults.rs index 51aa244151f63..da4ac197808c7 100644 --- a/crates/oxc_linter/src/rules/jsdoc/no_defaults.rs +++ b/crates/oxc_linter/src/rules/jsdoc/no_defaults.rs @@ -61,9 +61,7 @@ struct NoDefaultsConfig { impl Rule for NoDefaults { fn from_configuration(value: serde_json::Value) -> Self { - serde_json::from_value::>(value) - .unwrap_or_default() - .into_inner() + serde_json::from_value::>(value).unwrap_or_default().into_inner() } fn run<'a>(&self, node: &AstNode<'a>, ctx: &LintContext<'a>) { diff --git a/crates/oxc_linter/src/rules/jsdoc/require_returns.rs b/crates/oxc_linter/src/rules/jsdoc/require_returns.rs index 34e7fb6d9c3fc..01f8bb294179c 100644 --- a/crates/oxc_linter/src/rules/jsdoc/require_returns.rs +++ b/crates/oxc_linter/src/rules/jsdoc/require_returns.rs @@ -99,9 +99,7 @@ declare_oxc_lint!( impl Rule for RequireReturns { fn from_configuration(value: serde_json::Value) -> Self { - serde_json::from_value::>(value) - .unwrap_or_default() - .into_inner() + serde_json::from_value::>(value).unwrap_or_default().into_inner() } fn run_once(&self, ctx: &LintContext) { diff --git a/crates/oxc_linter/src/rules/jsdoc/require_yields.rs b/crates/oxc_linter/src/rules/jsdoc/require_yields.rs index 58dc8529ac56c..2430a7af3e39c 100644 --- a/crates/oxc_linter/src/rules/jsdoc/require_yields.rs +++ b/crates/oxc_linter/src/rules/jsdoc/require_yields.rs @@ -105,9 +105,7 @@ declare_oxc_lint!( impl Rule for RequireYields { fn from_configuration(value: serde_json::Value) -> Self { - serde_json::from_value::>(value) - .unwrap_or_default() - .into_inner() + serde_json::from_value::>(value).unwrap_or_default().into_inner() } fn run<'a>(&self, node: &AstNode<'a>, ctx: &LintContext<'a>) { diff --git a/crates/oxc_linter/src/rules/jsx_a11y/anchor_ambiguous_text.rs b/crates/oxc_linter/src/rules/jsx_a11y/anchor_ambiguous_text.rs index f74b3aed205a6..c3cb8fc5a9a0a 100644 --- a/crates/oxc_linter/src/rules/jsx_a11y/anchor_ambiguous_text.rs +++ b/crates/oxc_linter/src/rules/jsx_a11y/anchor_ambiguous_text.rs @@ -97,9 +97,7 @@ declare_oxc_lint!( impl Rule for AnchorAmbiguousText { fn from_configuration(value: serde_json::Value) -> Self { - serde_json::from_value::>(value) - .unwrap_or_default() - .into_inner() + serde_json::from_value::>(value).unwrap_or_default().into_inner() } fn run<'a>(&self, node: &AstNode<'a>, ctx: &LintContext<'a>) { diff --git a/crates/oxc_linter/src/rules/jsx_a11y/aria_role.rs b/crates/oxc_linter/src/rules/jsx_a11y/aria_role.rs index c6d9ac471a67c..3538bdeb99d22 100644 --- a/crates/oxc_linter/src/rules/jsx_a11y/aria_role.rs +++ b/crates/oxc_linter/src/rules/jsx_a11y/aria_role.rs @@ -103,9 +103,7 @@ declare_oxc_lint!( impl Rule for AriaRole { fn from_configuration(value: serde_json::Value) -> Self { - serde_json::from_value::>(value) - .unwrap_or_default() - .into_inner() + serde_json::from_value::>(value).unwrap_or_default().into_inner() } fn run<'a>(&self, node: &AstNode<'a>, ctx: &LintContext<'a>) { diff --git a/crates/oxc_linter/src/rules/jsx_a11y/autocomplete_valid.rs b/crates/oxc_linter/src/rules/jsx_a11y/autocomplete_valid.rs index d3acc22617a2d..9cc698db7da43 100644 --- a/crates/oxc_linter/src/rules/jsx_a11y/autocomplete_valid.rs +++ b/crates/oxc_linter/src/rules/jsx_a11y/autocomplete_valid.rs @@ -154,9 +154,7 @@ fn is_valid_autocomplete_value(value: &str) -> bool { impl Rule for AutocompleteValid { fn from_configuration(config: Value) -> Self { - serde_json::from_value::>(config) - .unwrap_or_default() - .into_inner() + serde_json::from_value::>(config).unwrap_or_default().into_inner() } fn run<'a>(&self, node: &AstNode<'a>, ctx: &LintContext<'a>) { diff --git a/crates/oxc_linter/src/rules/jsx_a11y/heading_has_content.rs b/crates/oxc_linter/src/rules/jsx_a11y/heading_has_content.rs index ed6dfaa09800e..a5b76dcd4c599 100644 --- a/crates/oxc_linter/src/rules/jsx_a11y/heading_has_content.rs +++ b/crates/oxc_linter/src/rules/jsx_a11y/heading_has_content.rs @@ -75,9 +75,7 @@ const DEFAULT_COMPONENTS: [&str; 6] = ["h1", "h2", "h3", "h4", "h5", "h6"]; impl Rule for HeadingHasContent { fn from_configuration(value: serde_json::Value) -> Self { - serde_json::from_value::>(value) - .unwrap_or_default() - .into_inner() + serde_json::from_value::>(value).unwrap_or_default().into_inner() } fn run<'a>(&self, node: &AstNode<'a>, ctx: &LintContext<'a>) { diff --git a/crates/oxc_linter/src/rules/node/no_process_env.rs b/crates/oxc_linter/src/rules/node/no_process_env.rs index 9e68826021ed5..ac5d5f0df3ab2 100644 --- a/crates/oxc_linter/src/rules/node/no_process_env.rs +++ b/crates/oxc_linter/src/rules/node/no_process_env.rs @@ -71,9 +71,7 @@ fn is_process_global_object(object_expr: &oxc_ast::ast::Expression, ctx: &LintCo impl Rule for NoProcessEnv { fn from_configuration(value: serde_json::Value) -> Self { - serde_json::from_value::>(value) - .unwrap_or_default() - .into_inner() + serde_json::from_value::>(value).unwrap_or_default().into_inner() } fn run<'a>(&self, node: &AstNode<'a>, ctx: &LintContext<'a>) { diff --git a/crates/oxc_linter/src/rules/oxc/no_barrel_file.rs b/crates/oxc_linter/src/rules/oxc/no_barrel_file.rs index 5fc406bc9b1ff..3813296d511df 100644 --- a/crates/oxc_linter/src/rules/oxc/no_barrel_file.rs +++ b/crates/oxc_linter/src/rules/oxc/no_barrel_file.rs @@ -75,9 +75,7 @@ declare_oxc_lint!( impl Rule for NoBarrelFile { fn from_configuration(value: serde_json::Value) -> Self { - serde_json::from_value::>(value) - .unwrap_or_default() - .into_inner() + serde_json::from_value::>(value).unwrap_or_default().into_inner() } fn run_once(&self, ctx: &LintContext<'_>) { diff --git a/crates/oxc_linter/src/rules/oxc/no_map_spread.rs b/crates/oxc_linter/src/rules/oxc/no_map_spread.rs index 927b12425f002..c61ead97e10f3 100644 --- a/crates/oxc_linter/src/rules/oxc/no_map_spread.rs +++ b/crates/oxc_linter/src/rules/oxc/no_map_spread.rs @@ -319,9 +319,7 @@ const MAP_FN_NAMES: [&str; 2] = ["map", "flatMap"]; impl Rule for NoMapSpread { fn from_configuration(value: serde_json::Value) -> Self { - serde_json::from_value::>(value) - .unwrap_or_default() - .into_inner() + serde_json::from_value::>(value).unwrap_or_default().into_inner() } fn run<'a>(&self, node: &AstNode<'a>, ctx: &LintContext<'a>) { diff --git a/crates/oxc_linter/src/rules/oxc/no_optional_chaining.rs b/crates/oxc_linter/src/rules/oxc/no_optional_chaining.rs index e09899f606734..9ff69b55e81c7 100644 --- a/crates/oxc_linter/src/rules/oxc/no_optional_chaining.rs +++ b/crates/oxc_linter/src/rules/oxc/no_optional_chaining.rs @@ -73,9 +73,7 @@ declare_oxc_lint!( impl Rule for NoOptionalChaining { fn from_configuration(value: serde_json::Value) -> Self { - serde_json::from_value::>(value) - .unwrap_or_default() - .into_inner() + serde_json::from_value::>(value).unwrap_or_default().into_inner() } fn run<'a>(&self, node: &AstNode<'a>, ctx: &LintContext<'a>) { diff --git a/crates/oxc_linter/src/rules/oxc/no_rest_spread_properties.rs b/crates/oxc_linter/src/rules/oxc/no_rest_spread_properties.rs index 6f7e82e3cb730..d9bb9891c7276 100644 --- a/crates/oxc_linter/src/rules/oxc/no_rest_spread_properties.rs +++ b/crates/oxc_linter/src/rules/oxc/no_rest_spread_properties.rs @@ -66,9 +66,7 @@ declare_oxc_lint!( impl Rule for NoRestSpreadProperties { fn from_configuration(value: serde_json::Value) -> Self { - serde_json::from_value::>(value) - .unwrap_or_default() - .into_inner() + serde_json::from_value::>(value).unwrap_or_default().into_inner() } fn run<'a>(&self, node: &AstNode<'a>, ctx: &LintContext<'a>) { diff --git a/crates/oxc_linter/src/rules/promise/always_return.rs b/crates/oxc_linter/src/rules/promise/always_return.rs index 4ca5fe85d8013..542d58ff3e8a3 100644 --- a/crates/oxc_linter/src/rules/promise/always_return.rs +++ b/crates/oxc_linter/src/rules/promise/always_return.rs @@ -190,9 +190,7 @@ const PROCESS_METHODS: [&str; 2] = ["exit", "abort"]; impl Rule for AlwaysReturn { fn from_configuration(value: serde_json::Value) -> Self { - serde_json::from_value::>(value) - .unwrap_or_default() - .into_inner() + serde_json::from_value::>(value).unwrap_or_default().into_inner() } fn run<'a>(&self, node: &AstNode<'a>, ctx: &LintContext<'a>) { diff --git a/crates/oxc_linter/src/rules/promise/no_return_wrap.rs b/crates/oxc_linter/src/rules/promise/no_return_wrap.rs index 2eaad94ef0fe1..51fa8beff5afa 100644 --- a/crates/oxc_linter/src/rules/promise/no_return_wrap.rs +++ b/crates/oxc_linter/src/rules/promise/no_return_wrap.rs @@ -137,9 +137,7 @@ declare_oxc_lint!( impl Rule for NoReturnWrap { fn from_configuration(value: serde_json::Value) -> Self { - serde_json::from_value::>(value) - .unwrap_or_default() - .into_inner() + serde_json::from_value::>(value).unwrap_or_default().into_inner() } fn run<'a>(&self, node: &AstNode<'a>, ctx: &LintContext<'a>) { diff --git a/crates/oxc_linter/src/rules/promise/prefer_await_to_then.rs b/crates/oxc_linter/src/rules/promise/prefer_await_to_then.rs index 3c9534194ea1a..48b4f92d427fb 100644 --- a/crates/oxc_linter/src/rules/promise/prefer_await_to_then.rs +++ b/crates/oxc_linter/src/rules/promise/prefer_await_to_then.rs @@ -74,9 +74,7 @@ fn is_inside_yield_or_await(node: &AstNode) -> bool { impl Rule for PreferAwaitToThen { fn from_configuration(value: serde_json::Value) -> Self { - serde_json::from_value::>(value) - .unwrap_or_default() - .into_inner() + serde_json::from_value::>(value).unwrap_or_default().into_inner() } fn run<'a>(&self, node: &AstNode<'a>, ctx: &LintContext<'a>) { diff --git a/crates/oxc_linter/src/rules/promise/spec_only.rs b/crates/oxc_linter/src/rules/promise/spec_only.rs index b988f674a113a..eddd259a22250 100644 --- a/crates/oxc_linter/src/rules/promise/spec_only.rs +++ b/crates/oxc_linter/src/rules/promise/spec_only.rs @@ -63,9 +63,7 @@ declare_oxc_lint!( impl Rule for SpecOnly { fn from_configuration(value: serde_json::Value) -> Self { - serde_json::from_value::>(value) - .unwrap_or_default() - .into_inner() + serde_json::from_value::>(value).unwrap_or_default().into_inner() } fn run<'a>(&self, node: &AstNode<'a>, ctx: &LintContext<'a>) { diff --git a/crates/oxc_linter/src/rules/react/button_has_type.rs b/crates/oxc_linter/src/rules/react/button_has_type.rs index ebde161a235aa..ddfaaf8e17177 100644 --- a/crates/oxc_linter/src/rules/react/button_has_type.rs +++ b/crates/oxc_linter/src/rules/react/button_has_type.rs @@ -80,9 +80,7 @@ declare_oxc_lint!( impl Rule for ButtonHasType { fn from_configuration(value: serde_json::Value) -> Self { - serde_json::from_value::>(value) - .unwrap_or_default() - .into_inner() + serde_json::from_value::>(value).unwrap_or_default().into_inner() } fn run<'a>(&self, node: &AstNode<'a>, ctx: &LintContext<'a>) { diff --git a/crates/oxc_linter/src/rules/react/checked_requires_onchange_or_readonly.rs b/crates/oxc_linter/src/rules/react/checked_requires_onchange_or_readonly.rs index eb47e3bccc357..a641bbea1c152 100644 --- a/crates/oxc_linter/src/rules/react/checked_requires_onchange_or_readonly.rs +++ b/crates/oxc_linter/src/rules/react/checked_requires_onchange_or_readonly.rs @@ -193,9 +193,7 @@ impl Rule for CheckedRequiresOnchangeOrReadonly { } fn from_configuration(value: serde_json::Value) -> Self { - serde_json::from_value::>(value) - .unwrap_or_default() - .into_inner() + serde_json::from_value::>(value).unwrap_or_default().into_inner() } } diff --git a/crates/oxc_linter/src/rules/react/jsx_fragments.rs b/crates/oxc_linter/src/rules/react/jsx_fragments.rs index ae20b2cf8113b..37e25877e52e7 100644 --- a/crates/oxc_linter/src/rules/react/jsx_fragments.rs +++ b/crates/oxc_linter/src/rules/react/jsx_fragments.rs @@ -107,9 +107,7 @@ impl Rule for JsxFragments { // Generally we should prefer the string-only syntax for compatibility with the original ESLint rule, // but we originally implemented the rule with only the object syntax, so we support both now. fn from_configuration(value: Value) -> Self { - serde_json::from_value::>(value) - .unwrap_or_default() - .into_inner() + serde_json::from_value::>(value).unwrap_or_default().into_inner() } fn run<'a>(&self, node: &AstNode<'a>, ctx: &LintContext<'a>) { diff --git a/crates/oxc_linter/src/rules/react/jsx_key.rs b/crates/oxc_linter/src/rules/react/jsx_key.rs index 39f23fc1a95b9..25dfde32e71a9 100644 --- a/crates/oxc_linter/src/rules/react/jsx_key.rs +++ b/crates/oxc_linter/src/rules/react/jsx_key.rs @@ -109,7 +109,7 @@ declare_oxc_lint!( impl Rule for JsxKey { fn from_configuration(value: serde_json::Value) -> Self { - serde_json::from_value::>(value).unwrap_or_default().into_inner() + serde_json::from_value::>(value).unwrap_or_default().into_inner() } fn run<'a>(&self, node: &AstNode<'a>, ctx: &LintContext<'a>) { diff --git a/crates/oxc_linter/src/rules/react/jsx_max_depth.rs b/crates/oxc_linter/src/rules/react/jsx_max_depth.rs index f841ecd1df0be..dea5be7830cc4 100644 --- a/crates/oxc_linter/src/rules/react/jsx_max_depth.rs +++ b/crates/oxc_linter/src/rules/react/jsx_max_depth.rs @@ -102,7 +102,7 @@ declare_oxc_lint!( impl Rule for JsxMaxDepth { fn from_configuration(value: serde_json::Value) -> Self { - serde_json::from_value::>(value) + serde_json::from_value::>(value) .map(DefaultRuleConfig::into_inner) .unwrap_or_default() } diff --git a/crates/oxc_linter/src/rules/react/jsx_no_target_blank.rs b/crates/oxc_linter/src/rules/react/jsx_no_target_blank.rs index a5d2ffed4e1ce..bad75ea4db2c8 100644 --- a/crates/oxc_linter/src/rules/react/jsx_no_target_blank.rs +++ b/crates/oxc_linter/src/rules/react/jsx_no_target_blank.rs @@ -145,9 +145,7 @@ declare_oxc_lint!( impl Rule for JsxNoTargetBlank { fn from_configuration(value: serde_json::Value) -> Self { - serde_json::from_value::>(value) - .unwrap_or_default() - .into_inner() + serde_json::from_value::>(value).unwrap_or_default().into_inner() } fn run<'a>(&self, node: &AstNode<'a>, ctx: &LintContext<'a>) { diff --git a/crates/oxc_linter/src/rules/react/jsx_no_useless_fragment.rs b/crates/oxc_linter/src/rules/react/jsx_no_useless_fragment.rs index d5b4b7a18732a..e2cfce82910e0 100644 --- a/crates/oxc_linter/src/rules/react/jsx_no_useless_fragment.rs +++ b/crates/oxc_linter/src/rules/react/jsx_no_useless_fragment.rs @@ -69,9 +69,7 @@ declare_oxc_lint!( impl Rule for JsxNoUselessFragment { fn from_configuration(value: serde_json::Value) -> Self { - serde_json::from_value::>(value) - .unwrap_or_default() - .into_inner() + serde_json::from_value::>(value).unwrap_or_default().into_inner() } fn run<'a>(&self, node: &AstNode<'a>, ctx: &LintContext<'a>) { diff --git a/crates/oxc_linter/src/rules/react/jsx_pascal_case.rs b/crates/oxc_linter/src/rules/react/jsx_pascal_case.rs index 433bd557e11c5..5432d1443f510 100644 --- a/crates/oxc_linter/src/rules/react/jsx_pascal_case.rs +++ b/crates/oxc_linter/src/rules/react/jsx_pascal_case.rs @@ -111,9 +111,7 @@ declare_oxc_lint!( impl Rule for JsxPascalCase { fn from_configuration(value: serde_json::Value) -> Self { - serde_json::from_value::>(value) - .unwrap_or_default() - .into_inner() + serde_json::from_value::>(value).unwrap_or_default().into_inner() } fn run<'a>(&self, node: &AstNode<'a>, ctx: &LintContext<'a>) { diff --git a/crates/oxc_linter/src/rules/react/jsx_props_no_spreading.rs b/crates/oxc_linter/src/rules/react/jsx_props_no_spreading.rs index e9071800de088..d163faf1b30fe 100644 --- a/crates/oxc_linter/src/rules/react/jsx_props_no_spreading.rs +++ b/crates/oxc_linter/src/rules/react/jsx_props_no_spreading.rs @@ -91,9 +91,7 @@ declare_oxc_lint!( impl Rule for JsxPropsNoSpreading { fn from_configuration(value: serde_json::Value) -> Self { - serde_json::from_value::>(value) - .unwrap_or_default() - .into_inner() + serde_json::from_value::>(value).unwrap_or_default().into_inner() } fn run<'a>(&self, node: &AstNode<'a>, ctx: &LintContext<'a>) { diff --git a/crates/oxc_linter/src/rules/react/no_did_mount_set_state.rs b/crates/oxc_linter/src/rules/react/no_did_mount_set_state.rs index bcda0401f0ac1..4b130b53d674c 100644 --- a/crates/oxc_linter/src/rules/react/no_did_mount_set_state.rs +++ b/crates/oxc_linter/src/rules/react/no_did_mount_set_state.rs @@ -91,9 +91,7 @@ declare_oxc_lint!( impl Rule for NoDidMountSetState { fn from_configuration(value: serde_json::Value) -> Self { - serde_json::from_value::>(value) - .unwrap_or_default() - .into_inner() + serde_json::from_value::>(value).unwrap_or_default().into_inner() } fn run<'a>(&self, node: &AstNode<'a>, ctx: &LintContext<'a>) { diff --git a/crates/oxc_linter/src/rules/react/no_string_refs.rs b/crates/oxc_linter/src/rules/react/no_string_refs.rs index 55fae8bf8e87e..a6398e1b464a9 100644 --- a/crates/oxc_linter/src/rules/react/no_string_refs.rs +++ b/crates/oxc_linter/src/rules/react/no_string_refs.rs @@ -115,9 +115,7 @@ fn is_literal_ref_attribute(attr: &JSXAttribute, no_template_literals: bool) -> impl Rule for NoStringRefs { fn from_configuration(value: serde_json::Value) -> Self { - serde_json::from_value::>(value) - .unwrap_or_default() - .into_inner() + serde_json::from_value::>(value).unwrap_or_default().into_inner() } fn run<'a>(&self, node: &AstNode<'a>, ctx: &LintContext<'a>) { diff --git a/crates/oxc_linter/src/rules/react/no_unknown_property.rs b/crates/oxc_linter/src/rules/react/no_unknown_property.rs index 7ae43f4effb3e..7d0fae9c1af62 100644 --- a/crates/oxc_linter/src/rules/react/no_unknown_property.rs +++ b/crates/oxc_linter/src/rules/react/no_unknown_property.rs @@ -474,9 +474,7 @@ fn has_uppercase(name: &str) -> bool { impl Rule for NoUnknownProperty { fn from_configuration(value: serde_json::Value) -> Self { - serde_json::from_value::>(value) - .unwrap_or_default() - .into_inner() + serde_json::from_value::>(value).unwrap_or_default().into_inner() } fn run<'a>(&self, node: &AstNode<'a>, ctx: &LintContext<'a>) { diff --git a/crates/oxc_linter/src/rules/react/no_unsafe.rs b/crates/oxc_linter/src/rules/react/no_unsafe.rs index dec93f8b9c3fe..aa4cc803528ce 100644 --- a/crates/oxc_linter/src/rules/react/no_unsafe.rs +++ b/crates/oxc_linter/src/rules/react/no_unsafe.rs @@ -91,9 +91,7 @@ declare_oxc_lint!( impl Rule for NoUnsafe { fn from_configuration(value: serde_json::Value) -> Self { - serde_json::from_value::>(value) - .unwrap_or_default() - .into_inner() + serde_json::from_value::>(value).unwrap_or_default().into_inner() } fn run<'a>(&self, node: &AstNode<'a>, ctx: &LintContext<'a>) { diff --git a/crates/oxc_linter/src/rules/react/prefer_es6_class.rs b/crates/oxc_linter/src/rules/react/prefer_es6_class.rs index 3aec888b5fe0e..4a87a35626d13 100644 --- a/crates/oxc_linter/src/rules/react/prefer_es6_class.rs +++ b/crates/oxc_linter/src/rules/react/prefer_es6_class.rs @@ -63,9 +63,7 @@ declare_oxc_lint!( impl Rule for PreferEs6Class { fn from_configuration(value: serde_json::Value) -> Self { - serde_json::from_value::>(value) - .unwrap_or_default() - .into_inner() + serde_json::from_value::>(value).unwrap_or_default().into_inner() } fn run<'a>(&self, node: &AstNode<'a>, ctx: &LintContext<'a>) { diff --git a/crates/oxc_linter/src/rules/react/self_closing_comp.rs b/crates/oxc_linter/src/rules/react/self_closing_comp.rs index 747e0ce0501fc..615e6c0d60042 100644 --- a/crates/oxc_linter/src/rules/react/self_closing_comp.rs +++ b/crates/oxc_linter/src/rules/react/self_closing_comp.rs @@ -77,9 +77,7 @@ declare_oxc_lint!( impl Rule for SelfClosingComp { fn from_configuration(value: serde_json::Value) -> Self { - serde_json::from_value::>(value) - .unwrap_or_default() - .into_inner() + serde_json::from_value::>(value).unwrap_or_default().into_inner() } fn run<'a>(&self, node: &AstNode<'a>, ctx: &LintContext<'a>) { diff --git a/crates/oxc_linter/src/rules/react/state_in_constructor.rs b/crates/oxc_linter/src/rules/react/state_in_constructor.rs index 303b452535db2..af02db9924649 100644 --- a/crates/oxc_linter/src/rules/react/state_in_constructor.rs +++ b/crates/oxc_linter/src/rules/react/state_in_constructor.rs @@ -129,9 +129,7 @@ declare_oxc_lint!( impl Rule for StateInConstructor { fn from_configuration(value: serde_json::Value) -> Self { - serde_json::from_value::>(value) - .unwrap_or_default() - .into_inner() + serde_json::from_value::>(value).unwrap_or_default().into_inner() } fn run<'a>(&self, node: &AstNode<'a>, ctx: &LintContext<'a>) { diff --git a/crates/oxc_linter/src/rules/react/style_prop_object.rs b/crates/oxc_linter/src/rules/react/style_prop_object.rs index 3080b46e9a71f..cbe8973bca735 100644 --- a/crates/oxc_linter/src/rules/react/style_prop_object.rs +++ b/crates/oxc_linter/src/rules/react/style_prop_object.rs @@ -146,9 +146,7 @@ fn is_invalid_style_attribute<'a>(attribute: &JSXAttribute<'a>, ctx: &LintContex impl Rule for StylePropObject { fn from_configuration(value: serde_json::Value) -> Self { - serde_json::from_value::>(value) - .unwrap_or_default() - .into_inner() + serde_json::from_value::>(value).unwrap_or_default().into_inner() } fn run<'a>(&self, node: &AstNode<'a>, ctx: &LintContext<'a>) { diff --git a/crates/oxc_linter/src/rules/typescript/array_type.rs b/crates/oxc_linter/src/rules/typescript/array_type.rs index 35eb6c68af698..2f70353be59db 100644 --- a/crates/oxc_linter/src/rules/typescript/array_type.rs +++ b/crates/oxc_linter/src/rules/typescript/array_type.rs @@ -138,9 +138,7 @@ fn array_simple( impl Rule for ArrayType { fn from_configuration(value: serde_json::Value) -> Self { - serde_json::from_value::>(value) - .unwrap_or_default() - .into_inner() + serde_json::from_value::>(value).unwrap_or_default().into_inner() } fn run<'a>(&self, node: &AstNode<'a>, ctx: &LintContext<'a>) { diff --git a/crates/oxc_linter/src/rules/typescript/consistent_indexed_object_style.rs b/crates/oxc_linter/src/rules/typescript/consistent_indexed_object_style.rs index 4612d53d512ff..204e3e81c2968 100644 --- a/crates/oxc_linter/src/rules/typescript/consistent_indexed_object_style.rs +++ b/crates/oxc_linter/src/rules/typescript/consistent_indexed_object_style.rs @@ -109,9 +109,7 @@ declare_oxc_lint!( impl Rule for ConsistentIndexedObjectStyle { fn from_configuration(value: serde_json::Value) -> Self { - serde_json::from_value::>(value) - .unwrap_or_default() - .into_inner() + serde_json::from_value::>(value).unwrap_or_default().into_inner() } fn run<'a>(&self, node: &AstNode<'a>, ctx: &LintContext<'a>) { diff --git a/crates/oxc_linter/src/rules/typescript/consistent_type_definitions.rs b/crates/oxc_linter/src/rules/typescript/consistent_type_definitions.rs index 079b4ff4bb7ec..8552ddd1771c4 100644 --- a/crates/oxc_linter/src/rules/typescript/consistent_type_definitions.rs +++ b/crates/oxc_linter/src/rules/typescript/consistent_type_definitions.rs @@ -92,9 +92,7 @@ declare_oxc_lint!( impl Rule for ConsistentTypeDefinitions { fn from_configuration(value: serde_json::Value) -> Self { - serde_json::from_value::>(value) - .unwrap_or_default() - .into_inner() + serde_json::from_value::>(value).unwrap_or_default().into_inner() } fn run<'a>(&self, node: &AstNode<'a>, ctx: &LintContext<'a>) { diff --git a/crates/oxc_linter/src/rules/typescript/consistent_type_imports.rs b/crates/oxc_linter/src/rules/typescript/consistent_type_imports.rs index 4002d0bfee562..56cec4e7bd88a 100644 --- a/crates/oxc_linter/src/rules/typescript/consistent_type_imports.rs +++ b/crates/oxc_linter/src/rules/typescript/consistent_type_imports.rs @@ -173,9 +173,7 @@ declare_oxc_lint!( impl Rule for ConsistentTypeImports { fn from_configuration(value: serde_json::Value) -> Self { - serde_json::from_value::>(value) - .unwrap_or_default() - .into_inner() + serde_json::from_value::>(value).unwrap_or_default().into_inner() } fn run<'a>(&self, node: &AstNode<'a>, ctx: &LintContext<'a>) { diff --git a/crates/oxc_linter/src/rules/typescript/explicit_function_return_type.rs b/crates/oxc_linter/src/rules/typescript/explicit_function_return_type.rs index 67a97f3977b28..40ff5968aae05 100644 --- a/crates/oxc_linter/src/rules/typescript/explicit_function_return_type.rs +++ b/crates/oxc_linter/src/rules/typescript/explicit_function_return_type.rs @@ -147,9 +147,7 @@ fn explicit_function_return_type_diagnostic(span: Span) -> OxcDiagnostic { impl Rule for ExplicitFunctionReturnType { fn from_configuration(value: serde_json::Value) -> Self { - serde_json::from_value::>(value) - .unwrap_or_default() - .into_inner() + serde_json::from_value::>(value).unwrap_or_default().into_inner() } fn run<'a>(&self, node: &AstNode<'a>, ctx: &LintContext<'a>) { diff --git a/crates/oxc_linter/src/rules/typescript/explicit_module_boundary_types.rs b/crates/oxc_linter/src/rules/typescript/explicit_module_boundary_types.rs index 4f2eadf5044ca..e06af049e9425 100644 --- a/crates/oxc_linter/src/rules/typescript/explicit_module_boundary_types.rs +++ b/crates/oxc_linter/src/rules/typescript/explicit_module_boundary_types.rs @@ -163,9 +163,7 @@ declare_oxc_lint!( impl Rule for ExplicitModuleBoundaryTypes { fn from_configuration(value: Value) -> Self { - serde_json::from_value::>(value) - .unwrap_or_default() - .into_inner() + serde_json::from_value::>(value).unwrap_or_default().into_inner() } fn run<'a>(&self, node: &AstNode<'a>, ctx: &LintContext<'a>) { diff --git a/crates/oxc_linter/src/rules/typescript/no_base_to_string.rs b/crates/oxc_linter/src/rules/typescript/no_base_to_string.rs index 650358c245137..223a5c8fa8a72 100644 --- a/crates/oxc_linter/src/rules/typescript/no_base_to_string.rs +++ b/crates/oxc_linter/src/rules/typescript/no_base_to_string.rs @@ -84,9 +84,7 @@ declare_oxc_lint!( impl Rule for NoBaseToString { fn from_configuration(value: serde_json::Value) -> Self { - serde_json::from_value::>(value) - .unwrap_or_default() - .into_inner() + serde_json::from_value::>(value).unwrap_or_default().into_inner() } fn to_configuration(&self) -> Option> { diff --git a/crates/oxc_linter/src/rules/typescript/no_confusing_void_expression.rs b/crates/oxc_linter/src/rules/typescript/no_confusing_void_expression.rs index bcc6e10710383..706b34d033f4a 100644 --- a/crates/oxc_linter/src/rules/typescript/no_confusing_void_expression.rs +++ b/crates/oxc_linter/src/rules/typescript/no_confusing_void_expression.rs @@ -74,9 +74,7 @@ declare_oxc_lint!( impl Rule for NoConfusingVoidExpression { fn from_configuration(value: serde_json::Value) -> Self { - serde_json::from_value::>(value) - .unwrap_or_default() - .into_inner() + serde_json::from_value::>(value).unwrap_or_default().into_inner() } fn to_configuration(&self) -> Option> { diff --git a/crates/oxc_linter/src/rules/typescript/no_deprecated.rs b/crates/oxc_linter/src/rules/typescript/no_deprecated.rs index 605aac8d065c5..0f81edac6befe 100644 --- a/crates/oxc_linter/src/rules/typescript/no_deprecated.rs +++ b/crates/oxc_linter/src/rules/typescript/no_deprecated.rs @@ -67,9 +67,7 @@ declare_oxc_lint!( impl Rule for NoDeprecated { fn from_configuration(value: serde_json::Value) -> Self { - serde_json::from_value::>(value) - .unwrap_or_default() - .into_inner() + serde_json::from_value::>(value).unwrap_or_default().into_inner() } fn to_configuration(&self) -> Option> { diff --git a/crates/oxc_linter/src/rules/typescript/no_duplicate_type_constituents.rs b/crates/oxc_linter/src/rules/typescript/no_duplicate_type_constituents.rs index 5483eafd952b1..267f6903df754 100644 --- a/crates/oxc_linter/src/rules/typescript/no_duplicate_type_constituents.rs +++ b/crates/oxc_linter/src/rules/typescript/no_duplicate_type_constituents.rs @@ -69,9 +69,7 @@ declare_oxc_lint!( impl Rule for NoDuplicateTypeConstituents { fn from_configuration(value: serde_json::Value) -> Self { - serde_json::from_value::>(value) - .unwrap_or_default() - .into_inner() + serde_json::from_value::>(value).unwrap_or_default().into_inner() } fn to_configuration(&self) -> Option> { diff --git a/crates/oxc_linter/src/rules/typescript/no_empty_interface.rs b/crates/oxc_linter/src/rules/typescript/no_empty_interface.rs index 3b5b127861143..8238468a3e323 100644 --- a/crates/oxc_linter/src/rules/typescript/no_empty_interface.rs +++ b/crates/oxc_linter/src/rules/typescript/no_empty_interface.rs @@ -66,9 +66,7 @@ declare_oxc_lint!( impl Rule for NoEmptyInterface { fn from_configuration(value: Value) -> Self { - serde_json::from_value::>(value) - .unwrap_or_default() - .into_inner() + serde_json::from_value::>(value).unwrap_or_default().into_inner() } fn run<'a>(&self, node: &AstNode<'a>, ctx: &LintContext<'a>) { diff --git a/crates/oxc_linter/src/rules/typescript/no_explicit_any.rs b/crates/oxc_linter/src/rules/typescript/no_explicit_any.rs index b8b9b24f7fe0d..2d85f482fc646 100644 --- a/crates/oxc_linter/src/rules/typescript/no_explicit_any.rs +++ b/crates/oxc_linter/src/rules/typescript/no_explicit_any.rs @@ -78,9 +78,7 @@ declare_oxc_lint!( impl Rule for NoExplicitAny { fn from_configuration(value: Value) -> Self { - serde_json::from_value::>(value) - .unwrap_or_default() - .into_inner() + serde_json::from_value::>(value).unwrap_or_default().into_inner() } fn run<'a>(&self, node: &AstNode<'a>, ctx: &LintContext<'a>) { diff --git a/crates/oxc_linter/src/rules/typescript/no_extraneous_class.rs b/crates/oxc_linter/src/rules/typescript/no_extraneous_class.rs index 4095e7bf63ee2..379239d4241e1 100644 --- a/crates/oxc_linter/src/rules/typescript/no_extraneous_class.rs +++ b/crates/oxc_linter/src/rules/typescript/no_extraneous_class.rs @@ -114,9 +114,7 @@ fn only_constructor_no_extraneous_class_diagnostic(span: Span) -> OxcDiagnostic impl Rule for NoExtraneousClass { fn from_configuration(value: serde_json::Value) -> Self { - serde_json::from_value::>(value) - .unwrap_or_default() - .into_inner() + serde_json::from_value::>(value).unwrap_or_default().into_inner() } fn run<'a>(&self, node: &AstNode<'a>, ctx: &LintContext<'a>) { diff --git a/crates/oxc_linter/src/rules/typescript/no_floating_promises.rs b/crates/oxc_linter/src/rules/typescript/no_floating_promises.rs index ddcad74a03aff..0d66e03775004 100644 --- a/crates/oxc_linter/src/rules/typescript/no_floating_promises.rs +++ b/crates/oxc_linter/src/rules/typescript/no_floating_promises.rs @@ -112,9 +112,7 @@ declare_oxc_lint!( impl Rule for NoFloatingPromises { fn from_configuration(value: serde_json::Value) -> Self { - serde_json::from_value::>(value) - .unwrap_or_default() - .into_inner() + serde_json::from_value::>(value).unwrap_or_default().into_inner() } fn to_configuration(&self) -> Option> { diff --git a/crates/oxc_linter/src/rules/typescript/no_inferrable_types.rs b/crates/oxc_linter/src/rules/typescript/no_inferrable_types.rs index 702e64b1938e6..236dc1e120f44 100644 --- a/crates/oxc_linter/src/rules/typescript/no_inferrable_types.rs +++ b/crates/oxc_linter/src/rules/typescript/no_inferrable_types.rs @@ -67,9 +67,7 @@ declare_oxc_lint!( impl Rule for NoInferrableTypes { fn from_configuration(value: serde_json::Value) -> Self { - serde_json::from_value::>(value) - .unwrap_or_default() - .into_inner() + serde_json::from_value::>(value).unwrap_or_default().into_inner() } fn run<'a>(&self, node: &AstNode<'a>, ctx: &LintContext<'a>) { diff --git a/crates/oxc_linter/src/rules/typescript/no_meaningless_void_operator.rs b/crates/oxc_linter/src/rules/typescript/no_meaningless_void_operator.rs index 994ee669cb77d..dd75dca32e2ed 100644 --- a/crates/oxc_linter/src/rules/typescript/no_meaningless_void_operator.rs +++ b/crates/oxc_linter/src/rules/typescript/no_meaningless_void_operator.rs @@ -65,9 +65,7 @@ declare_oxc_lint!( impl Rule for NoMeaninglessVoidOperator { fn from_configuration(value: serde_json::Value) -> Self { - serde_json::from_value::>(value) - .unwrap_or_default() - .into_inner() + serde_json::from_value::>(value).unwrap_or_default().into_inner() } fn to_configuration(&self) -> Option> { diff --git a/crates/oxc_linter/src/rules/typescript/no_misused_promises.rs b/crates/oxc_linter/src/rules/typescript/no_misused_promises.rs index b8c1aef847608..9bc4592a04f68 100644 --- a/crates/oxc_linter/src/rules/typescript/no_misused_promises.rs +++ b/crates/oxc_linter/src/rules/typescript/no_misused_promises.rs @@ -131,9 +131,7 @@ declare_oxc_lint!( impl Rule for NoMisusedPromises { fn from_configuration(value: serde_json::Value) -> Self { - serde_json::from_value::>(value) - .unwrap_or_default() - .into_inner() + serde_json::from_value::>(value).unwrap_or_default().into_inner() } fn to_configuration(&self) -> Option> { diff --git a/crates/oxc_linter/src/rules/typescript/no_misused_spread.rs b/crates/oxc_linter/src/rules/typescript/no_misused_spread.rs index fb1dc6a590a4f..cefa3dd6fb106 100644 --- a/crates/oxc_linter/src/rules/typescript/no_misused_spread.rs +++ b/crates/oxc_linter/src/rules/typescript/no_misused_spread.rs @@ -71,9 +71,7 @@ declare_oxc_lint!( impl Rule for NoMisusedSpread { fn from_configuration(value: serde_json::Value) -> Self { - serde_json::from_value::>(value) - .unwrap_or_default() - .into_inner() + serde_json::from_value::>(value).unwrap_or_default().into_inner() } fn to_configuration(&self) -> Option> { diff --git a/crates/oxc_linter/src/rules/typescript/no_require_imports.rs b/crates/oxc_linter/src/rules/typescript/no_require_imports.rs index 13698995e6dd6..88e9466a809cb 100644 --- a/crates/oxc_linter/src/rules/typescript/no_require_imports.rs +++ b/crates/oxc_linter/src/rules/typescript/no_require_imports.rs @@ -125,9 +125,7 @@ fn match_argument_value_with_regex(allow: &[CompactStr], argument_value: &str) - impl Rule for NoRequireImports { fn from_configuration(value: serde_json::Value) -> Self { - serde_json::from_value::>(value) - .unwrap_or_default() - .into_inner() + serde_json::from_value::>(value).unwrap_or_default().into_inner() } fn run<'a>(&self, node: &AstNode<'a>, ctx: &LintContext<'a>) { diff --git a/crates/oxc_linter/src/rules/typescript/no_restricted_types.rs b/crates/oxc_linter/src/rules/typescript/no_restricted_types.rs index 74ca2d06be04f..7afc935bafaba 100644 --- a/crates/oxc_linter/src/rules/typescript/no_restricted_types.rs +++ b/crates/oxc_linter/src/rules/typescript/no_restricted_types.rs @@ -150,9 +150,7 @@ declare_oxc_lint!( impl Rule for NoRestrictedTypes { fn from_configuration(value: serde_json::Value) -> Self { - serde_json::from_value::>(value) - .unwrap_or_default() - .into_inner() + serde_json::from_value::>(value).unwrap_or_default().into_inner() } fn run<'a>(&self, node: &AstNode<'a>, ctx: &LintContext<'a>) { diff --git a/crates/oxc_linter/src/rules/typescript/no_unnecessary_boolean_literal_compare.rs b/crates/oxc_linter/src/rules/typescript/no_unnecessary_boolean_literal_compare.rs index 7a083031fe81c..4af4c2c02a946 100644 --- a/crates/oxc_linter/src/rules/typescript/no_unnecessary_boolean_literal_compare.rs +++ b/crates/oxc_linter/src/rules/typescript/no_unnecessary_boolean_literal_compare.rs @@ -92,9 +92,7 @@ declare_oxc_lint!( impl Rule for NoUnnecessaryBooleanLiteralCompare { fn from_configuration(value: serde_json::Value) -> Self { - serde_json::from_value::>(value) - .unwrap_or_default() - .into_inner() + serde_json::from_value::>(value).unwrap_or_default().into_inner() } fn to_configuration(&self) -> Option> { diff --git a/crates/oxc_linter/src/rules/typescript/no_unnecessary_type_assertion.rs b/crates/oxc_linter/src/rules/typescript/no_unnecessary_type_assertion.rs index 429227a81704e..5ea555efa409e 100644 --- a/crates/oxc_linter/src/rules/typescript/no_unnecessary_type_assertion.rs +++ b/crates/oxc_linter/src/rules/typescript/no_unnecessary_type_assertion.rs @@ -72,9 +72,7 @@ declare_oxc_lint!( impl Rule for NoUnnecessaryTypeAssertion { fn from_configuration(value: serde_json::Value) -> Self { - serde_json::from_value::>(value) - .unwrap_or_default() - .into_inner() + serde_json::from_value::>(value).unwrap_or_default().into_inner() } fn to_configuration(&self) -> Option> { diff --git a/crates/oxc_linter/src/rules/typescript/no_unsafe_member_access.rs b/crates/oxc_linter/src/rules/typescript/no_unsafe_member_access.rs index 0b23b3f0b9056..9eb360c954788 100644 --- a/crates/oxc_linter/src/rules/typescript/no_unsafe_member_access.rs +++ b/crates/oxc_linter/src/rules/typescript/no_unsafe_member_access.rs @@ -68,9 +68,7 @@ declare_oxc_lint!( impl Rule for NoUnsafeMemberAccess { fn from_configuration(value: serde_json::Value) -> Self { - serde_json::from_value::>(value) - .unwrap_or_default() - .into_inner() + serde_json::from_value::>(value).unwrap_or_default().into_inner() } fn to_configuration(&self) -> Option> { diff --git a/crates/oxc_linter/src/rules/typescript/only_throw_error.rs b/crates/oxc_linter/src/rules/typescript/only_throw_error.rs index dffe31b64e6bc..144d191b0335a 100644 --- a/crates/oxc_linter/src/rules/typescript/only_throw_error.rs +++ b/crates/oxc_linter/src/rules/typescript/only_throw_error.rs @@ -87,9 +87,7 @@ declare_oxc_lint!( impl Rule for OnlyThrowError { fn from_configuration(value: serde_json::Value) -> Self { - serde_json::from_value::>(value) - .unwrap_or_default() - .into_inner() + serde_json::from_value::>(value).unwrap_or_default().into_inner() } fn to_configuration(&self) -> Option> { diff --git a/crates/oxc_linter/src/rules/typescript/prefer_literal_enum_member.rs b/crates/oxc_linter/src/rules/typescript/prefer_literal_enum_member.rs index 165697eab63cc..dc8dcaec967a4 100644 --- a/crates/oxc_linter/src/rules/typescript/prefer_literal_enum_member.rs +++ b/crates/oxc_linter/src/rules/typescript/prefer_literal_enum_member.rs @@ -59,9 +59,7 @@ declare_oxc_lint!( impl Rule for PreferLiteralEnumMember { fn from_configuration(value: serde_json::Value) -> Self { - serde_json::from_value::>(value) - .unwrap_or_default() - .into_inner() + serde_json::from_value::>(value).unwrap_or_default().into_inner() } fn run<'a>(&self, node: &AstNode<'a>, ctx: &LintContext<'a>) { diff --git a/crates/oxc_linter/src/rules/typescript/prefer_nullish_coalescing.rs b/crates/oxc_linter/src/rules/typescript/prefer_nullish_coalescing.rs index b1a397780f0d5..b7e60408f0bfb 100644 --- a/crates/oxc_linter/src/rules/typescript/prefer_nullish_coalescing.rs +++ b/crates/oxc_linter/src/rules/typescript/prefer_nullish_coalescing.rs @@ -140,9 +140,7 @@ declare_oxc_lint!( impl Rule for PreferNullishCoalescing { fn from_configuration(value: serde_json::Value) -> Self { - serde_json::from_value::>(value) - .unwrap_or_default() - .into_inner() + serde_json::from_value::>(value).unwrap_or_default().into_inner() } fn to_configuration(&self) -> Option> { diff --git a/crates/oxc_linter/src/rules/typescript/prefer_promise_reject_errors.rs b/crates/oxc_linter/src/rules/typescript/prefer_promise_reject_errors.rs index 2bf7b05ec5059..79a38eb768a42 100644 --- a/crates/oxc_linter/src/rules/typescript/prefer_promise_reject_errors.rs +++ b/crates/oxc_linter/src/rules/typescript/prefer_promise_reject_errors.rs @@ -77,9 +77,7 @@ declare_oxc_lint!( impl Rule for PreferPromiseRejectErrors { fn from_configuration(value: serde_json::Value) -> Self { - serde_json::from_value::>(value) - .unwrap_or_default() - .into_inner() + serde_json::from_value::>(value).unwrap_or_default().into_inner() } fn to_configuration(&self) -> Option> { diff --git a/crates/oxc_linter/src/rules/typescript/promise_function_async.rs b/crates/oxc_linter/src/rules/typescript/promise_function_async.rs index 1821ad70c0f88..f66ea03c3941d 100644 --- a/crates/oxc_linter/src/rules/typescript/promise_function_async.rs +++ b/crates/oxc_linter/src/rules/typescript/promise_function_async.rs @@ -109,9 +109,7 @@ declare_oxc_lint!( impl Rule for PromiseFunctionAsync { fn from_configuration(value: serde_json::Value) -> Self { - serde_json::from_value::>(value) - .unwrap_or_default() - .into_inner() + serde_json::from_value::>(value).unwrap_or_default().into_inner() } fn to_configuration(&self) -> Option> { diff --git a/crates/oxc_linter/src/rules/typescript/require_array_sort_compare.rs b/crates/oxc_linter/src/rules/typescript/require_array_sort_compare.rs index d12add2bfcabe..4fa842734dad8 100644 --- a/crates/oxc_linter/src/rules/typescript/require_array_sort_compare.rs +++ b/crates/oxc_linter/src/rules/typescript/require_array_sort_compare.rs @@ -79,9 +79,7 @@ declare_oxc_lint!( impl Rule for RequireArraySortCompare { fn from_configuration(value: serde_json::Value) -> Self { - serde_json::from_value::>(value) - .unwrap_or_default() - .into_inner() + serde_json::from_value::>(value).unwrap_or_default().into_inner() } fn to_configuration(&self) -> Option> { diff --git a/crates/oxc_linter/src/rules/typescript/restrict_plus_operands.rs b/crates/oxc_linter/src/rules/typescript/restrict_plus_operands.rs index 5b2a796786b0d..246f2e99d1972 100644 --- a/crates/oxc_linter/src/rules/typescript/restrict_plus_operands.rs +++ b/crates/oxc_linter/src/rules/typescript/restrict_plus_operands.rs @@ -98,9 +98,7 @@ declare_oxc_lint!( impl Rule for RestrictPlusOperands { fn from_configuration(value: serde_json::Value) -> Self { - serde_json::from_value::>(value) - .unwrap_or_default() - .into_inner() + serde_json::from_value::>(value).unwrap_or_default().into_inner() } fn to_configuration(&self) -> Option> { diff --git a/crates/oxc_linter/src/rules/typescript/restrict_template_expressions.rs b/crates/oxc_linter/src/rules/typescript/restrict_template_expressions.rs index b0c1f67ed1f6b..b244d18406478 100644 --- a/crates/oxc_linter/src/rules/typescript/restrict_template_expressions.rs +++ b/crates/oxc_linter/src/rules/typescript/restrict_template_expressions.rs @@ -128,9 +128,7 @@ declare_oxc_lint!( impl Rule for RestrictTemplateExpressions { fn from_configuration(value: serde_json::Value) -> Self { - serde_json::from_value::>(value) - .unwrap_or_default() - .into_inner() + serde_json::from_value::>(value).unwrap_or_default().into_inner() } fn to_configuration(&self) -> Option> { diff --git a/crates/oxc_linter/src/rules/typescript/return_await.rs b/crates/oxc_linter/src/rules/typescript/return_await.rs index 785a44efbf924..fe8b1b3f5a40e 100644 --- a/crates/oxc_linter/src/rules/typescript/return_await.rs +++ b/crates/oxc_linter/src/rules/typescript/return_await.rs @@ -105,9 +105,7 @@ declare_oxc_lint!( impl Rule for ReturnAwait { fn from_configuration(value: serde_json::Value) -> Self { - serde_json::from_value::>(value) - .unwrap_or_default() - .into_inner() + serde_json::from_value::>(value).unwrap_or_default().into_inner() } fn to_configuration(&self) -> Option> { diff --git a/crates/oxc_linter/src/rules/typescript/strict_boolean_expressions.rs b/crates/oxc_linter/src/rules/typescript/strict_boolean_expressions.rs index 2afdac99c1523..d2f47c89d8825 100644 --- a/crates/oxc_linter/src/rules/typescript/strict_boolean_expressions.rs +++ b/crates/oxc_linter/src/rules/typescript/strict_boolean_expressions.rs @@ -128,9 +128,7 @@ declare_oxc_lint!( impl Rule for StrictBooleanExpressions { fn from_configuration(value: serde_json::Value) -> Self { - serde_json::from_value::>(value) - .unwrap_or_default() - .into_inner() + serde_json::from_value::>(value).unwrap_or_default().into_inner() } fn to_configuration(&self) -> Option> { diff --git a/crates/oxc_linter/src/rules/typescript/switch_exhaustiveness_check.rs b/crates/oxc_linter/src/rules/typescript/switch_exhaustiveness_check.rs index 06c44b1ab0e9f..5975258e4bb4b 100644 --- a/crates/oxc_linter/src/rules/typescript/switch_exhaustiveness_check.rs +++ b/crates/oxc_linter/src/rules/typescript/switch_exhaustiveness_check.rs @@ -139,9 +139,7 @@ declare_oxc_lint!( impl Rule for SwitchExhaustivenessCheck { fn from_configuration(value: serde_json::Value) -> Self { - serde_json::from_value::>(value) - .unwrap_or_default() - .into_inner() + serde_json::from_value::>(value).unwrap_or_default().into_inner() } fn to_configuration(&self) -> Option> { diff --git a/crates/oxc_linter/src/rules/typescript/triple_slash_reference.rs b/crates/oxc_linter/src/rules/typescript/triple_slash_reference.rs index a1a8192be6487..152c968e0c4ec 100644 --- a/crates/oxc_linter/src/rules/typescript/triple_slash_reference.rs +++ b/crates/oxc_linter/src/rules/typescript/triple_slash_reference.rs @@ -102,9 +102,7 @@ declare_oxc_lint!( impl Rule for TripleSlashReference { fn from_configuration(value: serde_json::Value) -> Self { - serde_json::from_value::>(value) - .unwrap_or_default() - .into_inner() + serde_json::from_value::>(value).unwrap_or_default().into_inner() } fn run_once(&self, ctx: &LintContext) { diff --git a/crates/oxc_linter/src/rules/typescript/unbound_method.rs b/crates/oxc_linter/src/rules/typescript/unbound_method.rs index 65327c06fd888..deeae7c67e391 100644 --- a/crates/oxc_linter/src/rules/typescript/unbound_method.rs +++ b/crates/oxc_linter/src/rules/typescript/unbound_method.rs @@ -102,9 +102,7 @@ declare_oxc_lint!( impl Rule for UnboundMethod { fn from_configuration(value: serde_json::Value) -> Self { - serde_json::from_value::>(value) - .unwrap_or_default() - .into_inner() + serde_json::from_value::>(value).unwrap_or_default().into_inner() } fn to_configuration(&self) -> Option> { diff --git a/crates/oxc_linter/src/rules/unicorn/consistent_function_scoping.rs b/crates/oxc_linter/src/rules/unicorn/consistent_function_scoping.rs index 6eaef4929582b..d3748bd4d4add 100644 --- a/crates/oxc_linter/src/rules/unicorn/consistent_function_scoping.rs +++ b/crates/oxc_linter/src/rules/unicorn/consistent_function_scoping.rs @@ -161,9 +161,7 @@ declare_oxc_lint!( impl Rule for ConsistentFunctionScoping { fn from_configuration(value: serde_json::Value) -> Self { - serde_json::from_value::>(value) - .unwrap_or_default() - .into_inner() + serde_json::from_value::>(value).unwrap_or_default().into_inner() } fn run<'a>(&self, node: &AstNode<'a>, ctx: &LintContext<'a>) { diff --git a/crates/oxc_linter/src/rules/unicorn/explicit_length_check.rs b/crates/oxc_linter/src/rules/unicorn/explicit_length_check.rs index fc96f01258904..563acbcbc9226 100644 --- a/crates/oxc_linter/src/rules/unicorn/explicit_length_check.rs +++ b/crates/oxc_linter/src/rules/unicorn/explicit_length_check.rs @@ -266,9 +266,7 @@ impl ExplicitLengthCheck { impl Rule for ExplicitLengthCheck { fn from_configuration(value: serde_json::Value) -> Self { - serde_json::from_value::>(value) - .unwrap_or_default() - .into_inner() + serde_json::from_value::>(value).unwrap_or_default().into_inner() } fn run<'a>(&self, node: &AstNode<'a>, ctx: &LintContext<'a>) { diff --git a/crates/oxc_linter/src/rules/unicorn/no_array_reduce.rs b/crates/oxc_linter/src/rules/unicorn/no_array_reduce.rs index 07da8d00f4950..a04af3007fe0c 100644 --- a/crates/oxc_linter/src/rules/unicorn/no_array_reduce.rs +++ b/crates/oxc_linter/src/rules/unicorn/no_array_reduce.rs @@ -63,9 +63,7 @@ declare_oxc_lint!( impl Rule for NoArrayReduce { fn from_configuration(value: serde_json::Value) -> Self { - serde_json::from_value::>(value) - .unwrap_or_default() - .into_inner() + serde_json::from_value::>(value).unwrap_or_default().into_inner() } fn run<'a>(&self, node: &AstNode<'a>, ctx: &LintContext<'a>) { diff --git a/crates/oxc_linter/src/rules/unicorn/no_array_reverse.rs b/crates/oxc_linter/src/rules/unicorn/no_array_reverse.rs index b4e4c563a0693..400238f9e8798 100644 --- a/crates/oxc_linter/src/rules/unicorn/no_array_reverse.rs +++ b/crates/oxc_linter/src/rules/unicorn/no_array_reverse.rs @@ -70,9 +70,7 @@ declare_oxc_lint!( impl Rule for NoArrayReverse { fn from_configuration(value: Value) -> Self { - serde_json::from_value::>(value) - .unwrap_or_default() - .into_inner() + serde_json::from_value::>(value).unwrap_or_default().into_inner() } fn run<'a>(&self, node: &AstNode<'a>, ctx: &LintContext<'a>) { diff --git a/crates/oxc_linter/src/rules/unicorn/no_array_sort.rs b/crates/oxc_linter/src/rules/unicorn/no_array_sort.rs index d050e219ac310..cc54b02081ffc 100644 --- a/crates/oxc_linter/src/rules/unicorn/no_array_sort.rs +++ b/crates/oxc_linter/src/rules/unicorn/no_array_sort.rs @@ -70,9 +70,7 @@ declare_oxc_lint!( impl Rule for NoArraySort { fn from_configuration(value: Value) -> Self { - serde_json::from_value::>(value) - .unwrap_or_default() - .into_inner() + serde_json::from_value::>(value).unwrap_or_default().into_inner() } fn run<'a>(&self, node: &AstNode<'a>, ctx: &LintContext<'a>) { diff --git a/crates/oxc_linter/src/rules/unicorn/no_null.rs b/crates/oxc_linter/src/rules/unicorn/no_null.rs index 1b0066c726bfb..641e381bdbc2e 100644 --- a/crates/oxc_linter/src/rules/unicorn/no_null.rs +++ b/crates/oxc_linter/src/rules/unicorn/no_null.rs @@ -173,7 +173,7 @@ fn match_call_expression_pass_case(null_literal: &NullLiteral, call_expr: &CallE impl Rule for NoNull { fn from_configuration(value: Value) -> Self { - serde_json::from_value::>(value).unwrap_or_default().into_inner() + serde_json::from_value::>(value).unwrap_or_default().into_inner() } fn run<'a>(&self, node: &AstNode<'a>, ctx: &LintContext<'a>) { diff --git a/crates/oxc_linter/src/rules/unicorn/no_typeof_undefined.rs b/crates/oxc_linter/src/rules/unicorn/no_typeof_undefined.rs index 198696b6c66fa..50f6b28c98df5 100644 --- a/crates/oxc_linter/src/rules/unicorn/no_typeof_undefined.rs +++ b/crates/oxc_linter/src/rules/unicorn/no_typeof_undefined.rs @@ -89,9 +89,7 @@ impl Rule for NoTypeofUndefined { } fn from_configuration(value: serde_json::Value) -> Self { - serde_json::from_value::>(value) - .unwrap_or_default() - .into_inner() + serde_json::from_value::>(value).unwrap_or_default().into_inner() } } diff --git a/crates/oxc_linter/src/rules/unicorn/no_useless_promise_resolve_reject.rs b/crates/oxc_linter/src/rules/unicorn/no_useless_promise_resolve_reject.rs index 14316f63968e7..21ab4c4c03ed0 100644 --- a/crates/oxc_linter/src/rules/unicorn/no_useless_promise_resolve_reject.rs +++ b/crates/oxc_linter/src/rules/unicorn/no_useless_promise_resolve_reject.rs @@ -67,9 +67,7 @@ declare_oxc_lint!( impl Rule for NoUselessPromiseResolveReject { fn from_configuration(value: serde_json::Value) -> Self { - serde_json::from_value::>(value) - .unwrap_or_default() - .into_inner() + serde_json::from_value::>(value).unwrap_or_default().into_inner() } fn run<'a>(&self, node: &AstNode<'a>, ctx: &LintContext<'a>) { diff --git a/crates/oxc_linter/src/rules/unicorn/no_useless_undefined.rs b/crates/oxc_linter/src/rules/unicorn/no_useless_undefined.rs index eb31ef4f56502..2eb475021331a 100644 --- a/crates/oxc_linter/src/rules/unicorn/no_useless_undefined.rs +++ b/crates/oxc_linter/src/rules/unicorn/no_useless_undefined.rs @@ -153,9 +153,7 @@ fn is_has_function_return_type(node: &AstNode, ctx: &LintContext<'_>) -> bool { impl Rule for NoUselessUndefined { fn from_configuration(value: serde_json::Value) -> Self { - serde_json::from_value::>(value) - .unwrap_or_default() - .into_inner() + serde_json::from_value::>(value).unwrap_or_default().into_inner() } fn run<'a>(&self, node: &AstNode<'a>, ctx: &LintContext<'a>) { diff --git a/crates/oxc_linter/src/rules/unicorn/prefer_number_properties.rs b/crates/oxc_linter/src/rules/unicorn/prefer_number_properties.rs index 55522107f7c8a..ae56567088c95 100644 --- a/crates/oxc_linter/src/rules/unicorn/prefer_number_properties.rs +++ b/crates/oxc_linter/src/rules/unicorn/prefer_number_properties.rs @@ -88,9 +88,7 @@ declare_oxc_lint!( impl Rule for PreferNumberProperties { fn from_configuration(value: serde_json::Value) -> Self { - serde_json::from_value::>(value) - .unwrap_or_default() - .into_inner() + serde_json::from_value::>(value).unwrap_or_default().into_inner() } fn run<'a>(&self, node: &AstNode<'a>, ctx: &LintContext<'a>) { diff --git a/crates/oxc_linter/src/rules/unicorn/prefer_structured_clone.rs b/crates/oxc_linter/src/rules/unicorn/prefer_structured_clone.rs index f20bdb04f9a25..0e325a073fff2 100644 --- a/crates/oxc_linter/src/rules/unicorn/prefer_structured_clone.rs +++ b/crates/oxc_linter/src/rules/unicorn/prefer_structured_clone.rs @@ -79,9 +79,7 @@ declare_oxc_lint!( impl Rule for PreferStructuredClone { fn from_configuration(value: serde_json::Value) -> Self { - serde_json::from_value::>(value) - .unwrap_or_default() - .into_inner() + serde_json::from_value::>(value).unwrap_or_default().into_inner() } fn run<'a>(&self, node: &AstNode<'a>, ctx: &LintContext<'a>) { diff --git a/crates/oxc_linter/src/rules/unicorn/switch_case_braces.rs b/crates/oxc_linter/src/rules/unicorn/switch_case_braces.rs index f008f5b920d8e..bd337a9f0d2bb 100644 --- a/crates/oxc_linter/src/rules/unicorn/switch_case_braces.rs +++ b/crates/oxc_linter/src/rules/unicorn/switch_case_braces.rs @@ -96,9 +96,7 @@ declare_oxc_lint!( impl Rule for SwitchCaseBraces { fn from_configuration(value: serde_json::Value) -> Self { - serde_json::from_value::>(value) - .unwrap_or_default() - .into_inner() + serde_json::from_value::>(value).unwrap_or_default().into_inner() } fn run<'a>(&self, node: &AstNode<'a>, ctx: &LintContext<'a>) { diff --git a/crates/oxc_linter/src/rules/vue/define_emits_declaration.rs b/crates/oxc_linter/src/rules/vue/define_emits_declaration.rs index 4da231f323733..67b5566a5c2e4 100644 --- a/crates/oxc_linter/src/rules/vue/define_emits_declaration.rs +++ b/crates/oxc_linter/src/rules/vue/define_emits_declaration.rs @@ -129,9 +129,7 @@ declare_oxc_lint!( impl Rule for DefineEmitsDeclaration { fn from_configuration(value: serde_json::Value) -> Self { - serde_json::from_value::>(value) - .unwrap_or_default() - .into_inner() + serde_json::from_value::>(value).unwrap_or_default().into_inner() } fn run<'a>(&self, node: &AstNode<'a>, ctx: &LintContext<'a>) { diff --git a/crates/oxc_linter/src/rules/vue/define_props_declaration.rs b/crates/oxc_linter/src/rules/vue/define_props_declaration.rs index fc7f06ff82f50..c8911e78093b4 100644 --- a/crates/oxc_linter/src/rules/vue/define_props_declaration.rs +++ b/crates/oxc_linter/src/rules/vue/define_props_declaration.rs @@ -84,9 +84,7 @@ declare_oxc_lint!( impl Rule for DefinePropsDeclaration { fn from_configuration(value: serde_json::Value) -> Self { - serde_json::from_value::>(value) - .unwrap_or_default() - .into_inner() + serde_json::from_value::>(value).unwrap_or_default().into_inner() } fn run<'a>(&self, node: &AstNode<'a>, ctx: &LintContext<'a>) { diff --git a/crates/oxc_linter/src/rules/vue/define_props_destructuring.rs b/crates/oxc_linter/src/rules/vue/define_props_destructuring.rs index 71e3ad57128b1..d823d2842a632 100644 --- a/crates/oxc_linter/src/rules/vue/define_props_destructuring.rs +++ b/crates/oxc_linter/src/rules/vue/define_props_destructuring.rs @@ -82,9 +82,7 @@ declare_oxc_lint!( impl Rule for DefinePropsDestructuring { fn from_configuration(value: serde_json::Value) -> Self { - serde_json::from_value::>(value) - .unwrap_or_default() - .into_inner() + serde_json::from_value::>(value).unwrap_or_default().into_inner() } fn run<'a>(&self, node: &AstNode<'a>, ctx: &LintContext<'a>) {