Skip to content

Commit 44d1140

Browse files
[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
1 parent 9c25b15 commit 44d1140

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

js/check_config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ function checkConfigFile () {
5757
languageOptions: {
5858
ecmaVersion: "latest",
5959
globals: {
60+
...globals.browser,
6061
...globals.node
6162
}
6263
},

0 commit comments

Comments
 (0)