Skip to content

Commit

Permalink
fix(linter): rule no-new-native-nonconstructor do not look into glo…
Browse files Browse the repository at this point in the history
…bals (#9143)
  • Loading branch information
Sysix committed Feb 15, 2025
1 parent 1c1d2e6 commit 091a5c1
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ impl Rule for NoNewNativeNonconstructor {
return;
};
if matches!(ident.name.as_str(), "Symbol" | "BigInt")
&& ctx.is_reference_to_global_variable(ident)
&& ctx.scopes().root_unresolved_references().contains_key(ident.name.as_str())
{
let start = expr.span.start;
let end = start + 3;
Expand Down

0 comments on commit 091a5c1

Please sign in to comment.