Skip to content

Commit

Permalink
fix(linter): global variables should always check the builtin variables
Browse files Browse the repository at this point in the history
This fixes commit dbbb6fc.

Closes oxc-project#3374
  • Loading branch information
jelly committed Jul 11, 2024
1 parent 2602ce2 commit 10872b9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/oxc_linter/src/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ impl<'a> LintContext<'a> {
}

pub fn env_contains_var(&self, var: &str) -> bool {
if GLOBALS["builtin"].contains_key("var") {
if GLOBALS["builtin"].contains_key(var) {
return true;
}
for env in self.env().iter() {
Expand Down

0 comments on commit 10872b9

Please sign in to comment.