From 9b0a854ac58c78a100659ab6b8da4925a7349ec9 Mon Sep 17 00:00:00 2001 From: wolfgang Date: Mon, 15 Apr 2024 14:04:29 +0200 Subject: [PATCH] eslint.config update --- eslint.config.js | 13 ++----------- package.json | 1 + pnpm-lock.yaml | 8 ++++++++ 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/eslint.config.js b/eslint.config.js index 591c516..33271fc 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -1,8 +1,6 @@ -// import globals from 'globals'; +import globals from 'globals'; import js from '@eslint/js'; -// console.log(globals.browser); - export default [ js.configs.recommended, { @@ -10,14 +8,7 @@ export default [ ecmaVersion: 2022, sourceType: 'module', globals: { - // issue: Global "AudioWorkletGlobalScope " has leading or trailing whitespace. - // ...globals.browser, - - // fix (define globals) - document: true, - CustomEvent: false, - window: false, - console: false, + ...globals.browser, }, }, rules: { diff --git a/package.json b/package.json index 886c06e..4900348 100644 --- a/package.json +++ b/package.json @@ -51,6 +51,7 @@ "@babel/preset-env": "^7.24.4", "babel-loader": "^9.1.3", "eslint": "^9.0.0", + "globals": "^15.0.0", "html-webpack-plugin": "^5.6.0", "jsdom": "^24.0.0", "prettier": "^3.2.5", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 227c61d..92cefc1 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -23,6 +23,9 @@ devDependencies: eslint: specifier: ^9.0.0 version: 9.0.0 + globals: + specifier: ^15.0.0 + version: 15.0.0 html-webpack-plugin: specifier: ^5.6.0 version: 5.6.0(webpack@5.91.0) @@ -2749,6 +2752,11 @@ packages: engines: {node: '>=18'} dev: true + /globals@15.0.0: + resolution: {integrity: sha512-m/C/yR4mjO6pXDTm9/R/SpYTAIyaUB4EOzcaaMEl7mds7Mshct9GfejiJNQGjHHbdMPey13Kpu4TMbYi9ex1pw==} + engines: {node: '>=18'} + dev: true + /graceful-fs@4.2.11: resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==} dev: true