From 44d1140b57bc04b478a13ee3306fb54dbf431789 Mon Sep 17 00:00:00 2001 From: Kristjan ESPERANTO <35647502+KristjanESPERANTO@users.noreply.github.com> Date: Sun, 21 Dec 2025 10:45:40 +0100 Subject: [PATCH] [core] fix: allow browser globals in config files The config checker previously only allowed Node.js globals, but since the config file runs also in the browser context, users should be able to access browser APIs like `document` or `window` when needed. This was incorrectly flagged as an error by the `no-undef` ESLint rule. The fix adds browser globals to the allowed globals in the linter config. Fixes #3990 --- js/check_config.js | 1 + 1 file changed, 1 insertion(+) diff --git a/js/check_config.js b/js/check_config.js index e1108ed198..f2c9b2b7a2 100644 --- a/js/check_config.js +++ b/js/check_config.js @@ -57,6 +57,7 @@ function checkConfigFile () { languageOptions: { ecmaVersion: "latest", globals: { + ...globals.browser, ...globals.node } },