feat(web): 接入 ESLint 与 vitest,TrendChart hover 读数
- ESLint(flat config,vue essential + ts recommended)接入并清零: webauthn.ts 标注为刻意的动态类型边界(文件级豁免),theme-init.js 修掉未用的 catch 变量 - vitest + jsdom 接入,build 前置跑测试;覆盖 format 工具、auth store (token 只存内存、bootstrap 恢复、遗留键清理)、client.ts 401 拦截器 single-flight(自定义 axios adapter 模拟 401→refresh→重放) - TrendChart:hover 命中区盖满槽位(窄条也可悬停),读数显示在头部行, 标签行联动高亮 - auth store bootstrap 顺手清理旧版 localStorage 遗留的 access token 键
This commit is contained in:
1 parent
263bfb7845
commit
854d0f5d8c
10 files changed
+1713
-46
No files matched your search
+9
-2
@@ -5,8 +5,10 @@
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
"build": "vue-tsc -b && vite build",
|
||||
"preview": "vite preview"
|
||||
"build": "vue-tsc -b && vitest run --silent && vite build",
|
||||
"preview": "vite preview",
|
||||
"lint": "eslint .",
|
||||
"test": "vitest run"
|
||||
},
|
||||
"dependencies": {
|
||||
"@fontsource-variable/geist": "^5.2.5",
|
||||
@@ -21,9 +23,14 @@
|
||||
"@tailwindcss/vite": "^4.0.0",
|
||||
"@types/node": "^22.10.0",
|
||||
"@vitejs/plugin-vue": "^5.2.1",
|
||||
"@vue/eslint-config-typescript": "^14.9.0",
|
||||
"eslint": "^10.13.0",
|
||||
"eslint-plugin-vue": "^10.12.0",
|
||||
"jsdom": "^30.1.3",
|
||||
"tailwindcss": "^4.0.0",
|
||||
"typescript": "~5.6.2",
|
||||
"vite": "^6.0.0",
|
||||
"vitest": "^5.0.5",
|
||||
"vue-tsc": "^2.1.10"
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user