diff options
| author | supahgreg <supahgreg@users.noreply.github.com> | 2025-10-13 02:22:33 +0000 |
|---|---|---|
| committer | supahgreg <supahgreg@users.noreply.github.com> | 2025-10-13 02:22:45 +0000 |
| commit | 20d2ddabdbc70c3f8f15807ace5bd226082f6a50 (patch) | |
| tree | 2187c439d46219edbaf6a831a53ff9f4ed619d06 /eslint.config.js | |
| parent | 54b69728d0440922cb7bf83b2102506231c85ba3 (diff) | |
Handle browser globals in a much better way for ESLint.
Diffstat (limited to 'eslint.config.js')
| -rw-r--r-- | eslint.config.js | 26 |
1 files changed, 2 insertions, 24 deletions
diff --git a/eslint.config.js b/eslint.config.js index 9b54e36af..4902b2f0d 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -1,3 +1,4 @@ +import globals from 'globals'; import js from '@eslint/js'; export default [ @@ -9,30 +10,7 @@ export default [ ecmaVersion: 2022, sourceType: 'script', globals: { - // Browser - window: 'readonly', - document: 'readonly', - console: 'readonly', - alert: 'readonly', - confirm: 'readonly', - setTimeout: 'readonly', - setInterval: 'readonly', - clearTimeout: 'readonly', - clearInterval: 'readonly', - fetch: 'readonly', - XMLHttpRequest: 'readonly', - FormData: 'readonly', - URLSearchParams: 'readonly', - localStorage: 'readonly', - sessionStorage: 'readonly', - location: 'readonly', - history: 'readonly', - navigator: 'readonly', - Event: 'readonly', - CustomEvent: 'readonly', - Element: 'readonly', - IntersectionObserver: 'readonly', - MutationObserver: 'readonly', + ...globals.browser, // Dojo dojo: 'readonly', |