Skip to content

Commit 1cdc06c

Browse files
committed
chore: use globals in eslint config
1 parent 3f880be commit 1cdc06c

File tree

2 files changed

+6
-34
lines changed

2 files changed

+6
-34
lines changed

eslint.config.mjs

Lines changed: 4 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import js from '@eslint/js';
22
import react from 'eslint-plugin-react';
33
import reactHooks from 'eslint-plugin-react-hooks';
44
import reactRefresh from 'eslint-plugin-react-refresh';
5+
import globals from 'globals';
56

67
export default [
78
js.configs.recommended,
@@ -32,38 +33,9 @@ export default [
3233
ecmaVersion: 2020,
3334
sourceType: 'module',
3435
globals: {
35-
document: 'readonly',
36-
window: 'readonly',
37-
console: 'readonly',
38-
process: 'readonly',
39-
chrome: 'readonly',
40-
browser: 'readonly',
41-
setTimeout: 'readonly',
42-
clearTimeout: 'readonly',
43-
setInterval: 'readonly',
44-
clearInterval: 'readonly',
45-
fetch: 'readonly',
46-
URL: 'readonly',
47-
URLSearchParams: 'readonly',
48-
FormData: 'readonly',
49-
Headers: 'readonly',
50-
Request: 'readonly',
51-
Response: 'readonly',
52-
Blob: 'readonly',
53-
File: 'readonly',
54-
FileReader: 'readonly',
55-
localStorage: 'readonly',
56-
sessionStorage: 'readonly',
57-
location: 'readonly',
58-
history: 'readonly',
59-
navigator: 'readonly',
60-
Element: 'readonly',
61-
HTMLElement: 'readonly',
62-
Event: 'readonly',
63-
CustomEvent: 'readonly',
64-
MutationObserver: 'readonly',
65-
IntersectionObserver: 'readonly',
66-
ResizeObserver: 'readonly',
36+
...globals.node,
37+
...globals.browser,
38+
...globals.webextensions,
6739
},
6840
parserOptions: {
6941
ecmaFeatures: {

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)