mirror of
https://github.com/MagicMirrorOrg/MagicMirror.git
synced 2026-03-12 17:51:41 +08:00
[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:
committed by
GitHub
parent
9c25b15f6a
commit
9d3b07db12
@@ -57,6 +57,7 @@ function checkConfigFile () {
|
||||
languageOptions: {
|
||||
ecmaVersion: "latest",
|
||||
globals: {
|
||||
...globals.browser,
|
||||
...globals.node
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user