Files
OJ2/apps/web/package.json
yuetsh ae71055818 chore(前端): 接上 vue-tsc,模板里的字段名从此有类型检查
vite 不做类型检查,改错一个字段名只会在运行时变成静默 undefined ——
tsconfig.app.json 本来就 include 了 .vue,只是没人跑。装上 vue-tsc,
加 `bun run type-check`。

实测确认它能查到模板里的属性访问(往模板塞一个不存在的字段,如实报错)。

注意:它查不出模板编译错误(比如 v-model 绑了非 lvalue 的表达式),
所以 build 还是要跑,两者不能互相替代。

当前有 143 条既有错误,都是历史遗留,本次不清理。

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-25 13:43:37 -06:00

74 lines
2.2 KiB
JSON

{
"name": "@oj2/web",
"version": "1.9.0",
"type": "module",
"scripts": {
"dev": "vite",
"start": "vite",
"build": "vite build",
"build:staging": "vite build --mode staging",
"build:test": "vite build --mode test",
"fmt": "prettier --write src *.ts",
"type-check": "vue-tsc --noEmit -p tsconfig.app.json"
},
"dependencies": {
"@codemirror/autocomplete": "^6.20.3",
"@codemirror/lang-cpp": "^6.0.3",
"@codemirror/lang-python": "^6.2.1",
"@codemirror/lang-sql": "^6.10.0",
"@codemirror/language": "^6.12.4",
"@codemirror/state": "^6.7.1",
"@codemirror/view": "^6.43.8",
"@lezer/highlight": "^1.2.3",
"@oj2/contract": "workspace:*",
"@vue-flow/background": "^1.3.2",
"@vue-flow/controls": "^1.1.3",
"@vue-flow/core": "^1.48.2",
"@vue-flow/minimap": "^1.5.4",
"@vue-flow/node-resizer": "^1.5.1",
"@vue-flow/node-toolbar": "^1.1.1",
"@vueuse/core": "^14.4.0",
"@vueuse/router": "^14.4.0",
"@wangeditor-next/editor": "^6.2.0",
"@wangeditor-next/editor-for-vue": "^6.2.0",
"axios": "^1.19.0",
"canvas-confetti": "^1.9.4",
"chart.js": "^4.5.1",
"chartjs-chart-wordcloud": "^4.4.5",
"codemirror": "^6.0.2",
"copy-text-to-clipboard": "^3.2.2",
"date-fns": "^4.4.0",
"fflate": "^0.8.3",
"highlight.js": "^11.11.1",
"md-editor-v3": "^6.5.6",
"mermaid": "^11.16.1",
"mermaid-legacy": "npm:mermaid@^9.4.3",
"naive-ui": "^2.44.1",
"nanoid": "^6.0.1",
"normalize.css": "^8.0.1",
"pinia": "^4.0.2",
"skulpt": "^1.2.0",
"vue": "^3.5.41",
"vue-chartjs": "^5.3.4",
"vue-codemirror": "^6.1.1",
"vue-router": "^5.2.0",
"y-codemirror.next": "^0.3.5",
"y-webrtc": "^10.3.0",
"yjs": "^13.6.32"
},
"devDependencies": {
"@iconify/vue": "^5.0.1",
"@types/canvas-confetti": "^1.9.0",
"@types/node": "^26.1.2",
"@vitejs/plugin-legacy": "^8.2.3",
"@vitejs/plugin-vue": "^6.0.8",
"@vue/tsconfig": "^0.9.1",
"prettier": "^3.9.6",
"typescript": "^7.0.2",
"unplugin-auto-import": "^21.1.0",
"unplugin-vue-components": "^32.1.0",
"vite": "^8.2.1",
"vue-tsc": "^3.3.11"
}
}