[core] fix: allow browser globals in config files (#3992)

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.
This commit is contained in:
Kristjan ESPERANTO
2025-12-21 12:44:03 +01:00
committed by GitHub
parent 9c25b15f6a
commit 9d3b07db12

View File

@@ -57,6 +57,7 @@ function checkConfigFile () {
languageOptions: {
ecmaVersion: "latest",
globals: {
...globals.browser,
...globals.node
}
},