mirror of
https://github.com/danbulant/oxc
synced 2026-05-24 12:21:58 +00:00
refactor(linter/prefer_number_properties): remove the unused IdentifierName check (#3822)
This commit is contained in:
parent
a1b2d83ea9
commit
7302429b2b
1 changed files with 0 additions and 18 deletions
|
|
@ -83,24 +83,6 @@ impl Rule for PreferNumberProperties {
|
||||||
}
|
}
|
||||||
_ => {}
|
_ => {}
|
||||||
},
|
},
|
||||||
AstKind::IdentifierName(ident_name) => {
|
|
||||||
if matches!(
|
|
||||||
ctx.nodes().parent_kind(node.id()),
|
|
||||||
Some(AstKind::MemberExpression(_) | AstKind::PropertyKey(_))
|
|
||||||
) {
|
|
||||||
return;
|
|
||||||
};
|
|
||||||
|
|
||||||
match ident_name.name.as_str() {
|
|
||||||
"NaN" | "Infinity" => {
|
|
||||||
ctx.diagnostic(prefer_number_properties_diagnostic(
|
|
||||||
ident_name.span,
|
|
||||||
&ident_name.name,
|
|
||||||
));
|
|
||||||
}
|
|
||||||
_ => {}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
AstKind::CallExpression(call_expr) => {
|
AstKind::CallExpression(call_expr) => {
|
||||||
let Some(ident_name) = extract_ident_from_expression(&call_expr.callee) else {
|
let Some(ident_name) = extract_ident_from_expression(&call_expr.callee) else {
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue