From dd07a5475b7de695f90b694b625e656e5be00400 Mon Sep 17 00:00:00 2001 From: Jelle van der Waa Date: Thu, 11 Jul 2024 19:22:34 +0200 Subject: [PATCH] fix(linter): global variables should always check the builtin variables (#4209) This fixes commit dbbb6fca567cf06df8a548c6a7f87730fd38b4c2. Closes #3374 --- crates/oxc_linter/src/context.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/oxc_linter/src/context.rs b/crates/oxc_linter/src/context.rs index 5064dcc7407fd..156e6cf50de88 100644 --- a/crates/oxc_linter/src/context.rs +++ b/crates/oxc_linter/src/context.rs @@ -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() {