Skip to content

Commit 90b1cd6

Browse files
committed
Migrate ESLint 8→10: flat config, upgrade eslint-plugin-vue to v10
- Upgrade eslint-plugin-vue from ^9.33.0 to ^10.8.0 (required for ESLint 10 compat) - Add @eslint/js and globals as devDependencies - Replace .eslintrc.cjs with eslint.config.js (flat config format) - Update lint script to drop legacy --ext flag - Remove stale eslint-disable-next-line in demo-seed.mjs (no-constant-condition no longer flagged) Resolves ERESOLVE peer conflict: eslint-plugin-vue@9 requires eslint<10
1 parent 7d8874b commit 90b1cd6

File tree

5 files changed

+146
-134
lines changed

5 files changed

+146
-134
lines changed

frontend/taskdeck-web/.eslintrc.cjs

Lines changed: 0 additions & 49 deletions
This file was deleted.
Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
import pluginVue from 'eslint-plugin-vue'
2+
import tsParser from '@typescript-eslint/parser'
3+
import tsPlugin from '@typescript-eslint/eslint-plugin'
4+
import eslint from '@eslint/js'
5+
import vueParser from 'vue-eslint-parser'
6+
import globals from 'globals'
7+
8+
export default [
9+
// Base recommended config
10+
eslint.configs.recommended,
11+
12+
// TypeScript and Vue source files
13+
{
14+
files: ['**/*.ts', '**/*.vue'],
15+
plugins: { '@typescript-eslint': tsPlugin },
16+
languageOptions: {
17+
parser: vueParser,
18+
parserOptions: {
19+
parser: tsParser,
20+
sourceType: 'module',
21+
ecmaVersion: 'latest',
22+
extraFileExtensions: ['.vue'],
23+
},
24+
globals: {
25+
...globals.browser,
26+
...globals.node,
27+
...globals.es2022,
28+
},
29+
},
30+
rules: {
31+
...tsPlugin.configs.recommended.rules,
32+
// TypeScript handles undefined checking, no-undef causes false positives with TS namespaces
33+
'no-undef': 'off',
34+
'no-console': 'off',
35+
'@typescript-eslint/no-explicit-any': 'off',
36+
'@typescript-eslint/no-unused-vars': [
37+
'error',
38+
{ argsIgnorePattern: '^_', varsIgnorePattern: '^_' },
39+
],
40+
},
41+
},
42+
43+
// JavaScript / MJS scripts
44+
{
45+
files: ['**/*.mjs', '**/*.js'],
46+
languageOptions: {
47+
globals: {
48+
...globals.browser,
49+
...globals.node,
50+
...globals.es2022,
51+
},
52+
},
53+
rules: {
54+
'no-control-regex': 'off',
55+
},
56+
},
57+
58+
// Vue-specific rules
59+
...pluginVue.configs['flat/essential'],
60+
{
61+
files: ['**/*.vue'],
62+
rules: {
63+
'vue/multi-word-component-names': 'off',
64+
'vue/attributes-order': 'off',
65+
'vue/html-quotes': 'off',
66+
'vue/html-self-closing': 'off',
67+
'vue/max-attributes-per-line': 'off',
68+
'vue/singleline-html-element-content-newline': 'off',
69+
},
70+
},
71+
72+
// Test files (vitest)
73+
{
74+
files: ['**/*.spec.ts', '**/*.test.ts', 'src/tests/**/*.ts', 'tests/**/*.ts'],
75+
languageOptions: {
76+
globals: {
77+
...globals.browser,
78+
...globals.node,
79+
...globals.es2022,
80+
...globals.vitest,
81+
},
82+
},
83+
rules: {
84+
'@typescript-eslint/no-unused-expressions': 'off',
85+
},
86+
},
87+
88+
// Ignores
89+
{
90+
ignores: [
91+
'dist/**',
92+
'coverage/**',
93+
'test-results/**',
94+
'playwright-report/**',
95+
'node_modules/**',
96+
],
97+
},
98+
]

frontend/taskdeck-web/package-lock.json

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

frontend/taskdeck-web/package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"demo:snapshot": "node ./scripts/demo-snapshot.mjs --out ./demo-artifacts/snapshot.json",
1616
"demo:director": "node ./scripts/demo-director.mjs",
1717
"demo:director:smoke": "node ./scripts/demo-director.mjs --output-dir ./demo-artifacts/ci-smoke --e2e-db ./taskdeck.demo.ci.db --reset-e2e-db --scenario engineering-sprint --skip-llm --turns 0 --rng-seed ci-smoke",
18-
"lint": "eslint . --ext .ts,.vue --max-warnings=0",
18+
"lint": "eslint . --max-warnings=0",
1919
"typecheck": "vue-tsc -b",
2020
"build": "npm run typecheck && vite build",
2121
"preview": "vite preview",
@@ -40,6 +40,7 @@
4040
"ws": "file:vendor/ws-7.5.10.tgz"
4141
},
4242
"devDependencies": {
43+
"@eslint/js": "^9.0.0",
4344
"@playwright/test": "^1.56.1",
4445
"@types/dompurify": "^3.0.5",
4546
"@types/node": "^24.10.0",
@@ -53,7 +54,8 @@
5354
"autoprefixer": "^10.4.22",
5455
"baseline-browser-mapping": "^2.9.19",
5556
"eslint": "^10.1.0",
56-
"eslint-plugin-vue": "^9.33.0",
57+
"eslint-plugin-vue": "^10.8.0",
58+
"globals": "^17.4.0",
5759
"happy-dom": "^20.8.9",
5860
"postcss": "^8.5.6",
5961
"tailwindcss": "^3.4.18",

frontend/taskdeck-web/scripts/demo-seed.mjs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -508,7 +508,6 @@ async function ensureUser({ username, email, password }) {
508508

509509
async function waitFor(fn, { timeoutMs = 45000, intervalMs = 750, label = 'condition' } = {}) {
510510
const start = Date.now()
511-
// eslint-disable-next-line no-constant-condition
512511
while (true) {
513512
const val = await fn()
514513
if (val) return val

0 commit comments

Comments
 (0)