diff --git a/web/.eslintrc.cjs b/web/.eslintrc.cjs deleted file mode 100644 index b64731a0..00000000 --- a/web/.eslintrc.cjs +++ /dev/null @@ -1,14 +0,0 @@ -/* eslint-env node */ -require('@rushstack/eslint-patch/modern-module-resolution') - -module.exports = { - root: true, - 'extends': [ - 'plugin:vue/vue3-essential', - 'eslint:recommended', - '@vue/eslint-config-prettier/skip-formatting' - ], - parserOptions: { - ecmaVersion: 'latest' - } -} diff --git a/web/.gitignore b/web/.gitignore index 38adffa6..6df25ef2 100644 --- a/web/.gitignore +++ b/web/.gitignore @@ -26,3 +26,5 @@ coverage *.njsproj *.sln *.sw? + +.eslintcache diff --git a/web/eslint.config.js b/web/eslint.config.js new file mode 100644 index 00000000..fd51c2db --- /dev/null +++ b/web/eslint.config.js @@ -0,0 +1,27 @@ +import { defineConfig, globalIgnores } from 'eslint/config' +import globals from 'globals' +import js from '@eslint/js' +import pluginVue from 'eslint-plugin-vue' +import skipFormatting from '@vue/eslint-config-prettier/skip-formatting' + +export default defineConfig([ + { + name: 'app/files-to-lint', + files: ['**/*.{vue,js,mjs,jsx}'], + }, + + globalIgnores(['**/dist/**', '**/dist-ssr/**', '**/coverage/**']), + + { + languageOptions: { + globals: { + ...globals.browser, + }, + }, + }, + + js.configs.recommended, + ...pluginVue.configs['flat/essential'], + + skipFormatting, +]) diff --git a/web/package.json b/web/package.json index 09605ee0..4a779874 100644 --- a/web/package.json +++ b/web/package.json @@ -8,8 +8,8 @@ "server:prod": "vite serve --host --port 8080", "build": "vite build", "preview": "vite preview", - "lint": "eslint . --fix", - "format": "prettier --write src/" + "lint": "eslint . --fix --cache", + "format": "prettier --write --experimental-cli src/" }, "dependencies": { "@ant-design/icons-vue": "^7.0.1", @@ -39,14 +39,14 @@ "vue-router": "^4.5.1" }, "devDependencies": { - "@rushstack/eslint-patch": "^1.12.0", + "@eslint/js": "^9.39.2", "@vitejs/plugin-vue": "^6.0.1", "@vue/eslint-config-prettier": "^10.2.0", "eslint": "^9.34.0", "eslint-plugin-vue": "^10.4.0", + "globals": "^17.0.0", "prettier": "^3.6.2", - "vite": "^7.1.5", - "vue-eslint-parser": "^10.2.0" + "vite": "^7.1.5" }, "packageManager": "pnpm@10.11.0" } diff --git a/web/pnpm-lock.yaml b/web/pnpm-lock.yaml index 6bb64cdd..da5534b4 100644 --- a/web/pnpm-lock.yaml +++ b/web/pnpm-lock.yaml @@ -84,9 +84,9 @@ importers: specifier: ^4.5.1 version: 4.5.1(vue@3.5.21) devDependencies: - '@rushstack/eslint-patch': - specifier: ^1.12.0 - version: 1.12.0 + '@eslint/js': + specifier: ^9.39.2 + version: 9.39.2 '@vitejs/plugin-vue': specifier: ^6.0.1 version: 6.0.1(vite@7.1.5(@types/node@24.5.2)(less@4.4.1)(terser@5.44.0)(yaml@2.8.1))(vue@3.5.21) @@ -99,15 +99,15 @@ importers: eslint-plugin-vue: specifier: ^10.4.0 version: 10.5.0(eslint@9.36.0)(vue-eslint-parser@10.2.0(eslint@9.36.0)) + globals: + specifier: ^17.0.0 + version: 17.0.0 prettier: specifier: ^3.6.2 version: 3.6.2 vite: specifier: ^7.1.5 version: 7.1.5(@types/node@24.5.2)(less@4.4.1)(terser@5.44.0)(yaml@2.8.1) - vue-eslint-parser: - specifier: ^10.2.0 - version: 10.2.0(eslint@9.36.0) packages: @@ -507,6 +507,10 @@ packages: resolution: {integrity: sha512-uhCbYtYynH30iZErszX78U+nR3pJU3RHGQ57NXy5QupD4SBVwDeU8TNBy+MjMngc1UyIW9noKqsRqfjQTBU2dw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@eslint/js@9.39.2': + resolution: {integrity: sha512-q1mjIoW1VX4IvSocvM/vbTiveKC4k9eLrajNEuSsmjymSDEbpGddtpfOoN7YGAqBK3NG+uqo8ia4PDTt8buCYA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@eslint/object-schema@2.1.6': resolution: {integrity: sha512-RBMg5FRL0I0gs51M/guSAj5/e14VQ4tpZnQNWwuDT66P14I43ItmPfIZRhO9fUVIPOAQXU47atlywZ/czoqFPA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -730,9 +734,6 @@ packages: cpu: [x64] os: [win32] - '@rushstack/eslint-patch@1.12.0': - resolution: {integrity: sha512-5EwMtOqvJMMa3HbmxLlF74e+3/HhwBTMcvt3nqVJgGCozO6hzIPOBlwm8mGVNR9SN2IJpxSnlxczyDjcn7qIyw==} - '@sigma/edge-curve@3.1.0': resolution: {integrity: sha512-OFWkfAXEsm+X8l1K4K49cC0psB0gQ+gqxKA08HG5piNPdzrDZ5gG9Gza6htZ5AirOVwd/4/uq/gPpD5En+H+3Q==} peerDependencies: @@ -1527,6 +1528,10 @@ packages: resolution: {integrity: sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==} engines: {node: '>=18'} + globals@17.0.0: + resolution: {integrity: sha512-gv5BeD2EssA793rlFWVPMMCqefTlpusw6/2TbAVMy0FzcG8wKJn4O+NqJ4+XWmmwrayJgw5TzrmWjFgmz1XPqw==} + engines: {node: '>=18'} + graceful-fs@4.2.11: resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==} @@ -2923,6 +2928,8 @@ snapshots: '@eslint/js@9.36.0': {} + '@eslint/js@9.39.2': {} + '@eslint/object-schema@2.1.6': {} '@eslint/plugin-kit@0.3.5': @@ -3135,8 +3142,6 @@ snapshots: '@rollup/rollup-win32-x64-msvc@4.52.0': optional: true - '@rushstack/eslint-patch@1.12.0': {} - '@sigma/edge-curve@3.1.0(sigma@3.0.2(graphology-types@0.24.8))': dependencies: sigma: 3.0.2(graphology-types@0.24.8) @@ -4048,6 +4053,8 @@ snapshots: globals@14.0.0: {} + globals@17.0.0: {} + graceful-fs@4.2.11: {} graphlib@2.1.8: