Skip to content

Commit 9aefeda

Browse files
committed
refactor(linter): correctly handle loose options for eslint/eqeqeq
1 parent 0aeaedd commit 9aefeda

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

crates/oxc_linter/src/rules/eslint/eqeqeq.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ declare_oxc_lint!(
4242

4343
impl Rule for Eqeqeq {
4444
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);
45+
let first_arg = value.get(0).and_then(serde_json::Value::as_str);
4646

4747
let null_type = value
4848
.get(usize::from(first_arg.is_some()))
@@ -51,7 +51,7 @@ impl Rule for Eqeqeq {
5151
.map(NullType::from)
5252
.unwrap_or_default();
5353

54-
let compare_type = first_arg.unwrap_or_default();
54+
let compare_type = first_arg.map(CompareType::from).unwrap_or_default();
5555

5656
Self { compare_type, null_type }
5757
}

0 commit comments

Comments
 (0)