Skip to content

Commit 4239a7e

Browse files
committed
diagnostics on redeclaring framework globals
1 parent 5d32ccf commit 4239a7e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

crates/oxc_linter/src/rules/eslint/no_redeclare.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,9 @@ impl Rule for NoRedeclare {
8585
let name = ctx.scoping().symbol_name(symbol_id);
8686
let decl_span = ctx.scoping().symbol_span(symbol_id);
8787
let is_builtin = self.built_in_globals
88-
&& (GLOBALS["builtin"].contains_key(name) || ctx.globals().is_enabled(name));
88+
&& (GLOBALS["builtin"].contains_key(name)
89+
|| ctx.globals().is_enabled(name)
90+
|| ctx.frameworks_options().has_global(name));
8991

9092
if is_builtin {
9193
ctx.diagnostic(no_redeclare_as_builtin_in_diagnostic(name, decl_span));

0 commit comments

Comments
 (0)