diff --git a/frontend/eslint.config.mjs b/frontend/eslint.config.mjs index 8487f33aa..404626121 100644 --- a/frontend/eslint.config.mjs +++ b/frontend/eslint.config.mjs @@ -1,6 +1,7 @@ // @ts-check import eslint from '@eslint/js'; +import globals from "globals"; import { defineConfig } from 'eslint/config'; import tseslint from 'typescript-eslint'; @@ -17,7 +18,6 @@ export default defineConfig( "rules": { "no-empty": "off", // Temporarily disabled until codebase conformant "no-empty-pattern": "off", // Temporarily disabled until codebase conformant - "no-undef": "off", // Temporarily disabled until codebase conformant "no-useless-escape": "off", // Temporarily disabled until codebase conformant "no-case-declarations": "off", // Temporarily disabled until codebase conformant "prefer-const": "off", // Temporarily disabled until codebase conformant @@ -28,5 +28,29 @@ export default defineConfig( "@typescript-eslint/no-unused-expressions": "off", // Temporarily disabled until codebase conformant "@typescript-eslint/no-unused-vars": "off", // Temporarily disabled until codebase conformant }, - } + }, + // Config for browser scripts + { + files: [ + "src", + ], + languageOptions: { + globals: { + ...globals.browser, + } + } + }, + // Config for node scripts + { + files: [ + "scripts/*.js", + "postcss.config.js", + "tailwind.config.js", + ], + languageOptions: { + globals: { + ...globals.node, + } + } + }, ); diff --git a/frontend/package-lock.json b/frontend/package-lock.json index 342f0512f..1127ebd86 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -26,6 +26,7 @@ "@testing-library/user-event": "^13.5.0", "autoprefixer": "^10.4.21", "axios": "^1.9.0", + "globals": "^16.3.0", "i18next": "^25.2.1", "i18next-browser-languagedetector": "^8.1.0", "i18next-http-backend": "^3.0.2", @@ -447,6 +448,15 @@ "node": ">=6.9.0" } }, + "node_modules/@babel/traverse/node_modules/globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "license": "MIT", + "engines": { + "node": ">=4" + } + }, "node_modules/@babel/types": { "version": "7.28.2", "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.28.2.tgz", @@ -5595,12 +5605,15 @@ } }, "node_modules/globals": { - "version": "11.12.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", - "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "version": "16.3.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-16.3.0.tgz", + "integrity": "sha512-bqWEnJ1Nt3neqx2q5SFfGS8r/ahumIakg3HcwtNlrVlwXIeNumWn/c7Pn/wKzGhf6SaW6H6uWXLqC30STCMchQ==", "license": "MIT", "engines": { - "node": ">=4" + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/gonzales-pe": { diff --git a/frontend/package.json b/frontend/package.json index d73e9ad97..6700cbc20 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -22,6 +22,7 @@ "@testing-library/user-event": "^13.5.0", "autoprefixer": "^10.4.21", "axios": "^1.9.0", + "globals": "^16.3.0", "i18next": "^25.2.1", "i18next-browser-languagedetector": "^8.1.0", "i18next-http-backend": "^3.0.2",