Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions crates/oxc_linter/src/rules/eslint/eqeqeq.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ declare_oxc_lint!(

impl Rule for Eqeqeq {
fn from_configuration(value: serde_json::Value) -> Self {
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);

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

let compare_type = first_arg.unwrap_or_default();
let compare_type = first_arg.map(CompareType::from).unwrap_or_default();

Self { compare_type, null_type }
}
Expand Down