We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0aeaedd commit 9aefedaCopy full SHA for 9aefeda
crates/oxc_linter/src/rules/eslint/eqeqeq.rs
@@ -42,7 +42,7 @@ declare_oxc_lint!(
42
43
impl Rule for Eqeqeq {
44
fn from_configuration(value: serde_json::Value) -> Self {
45
- let first_arg = value.get(0).and_then(serde_json::Value::as_str).map(CompareType::from);
+ let first_arg = value.get(0).and_then(serde_json::Value::as_str);
46
47
let null_type = value
48
.get(usize::from(first_arg.is_some()))
@@ -51,7 +51,7 @@ impl Rule for Eqeqeq {
51
.map(NullType::from)
52
.unwrap_or_default();
53
54
- let compare_type = first_arg.unwrap_or_default();
+ let compare_type = first_arg.map(CompareType::from).unwrap_or_default();
55
56
Self { compare_type, null_type }
57
}
0 commit comments