2fcd0ed684
npm audit 全量原本报 2 critical + 2 high + 1 moderate,全在开发/测试链上 (vite dev server / vitest / tinypool / @vitest/mocker / source-map-js)。 不能靠"只记例外"糊过去:例外要人批,而这里是能真修的。 升到 vite 7.3.7 + vitest 5.0.3 后 audit 全量 0 命中,191 个前端用例仍全过。 同时锁 prettier 3.9.10 并加 format / format:check 脚本 —— 前端格式从此有门禁。 存量格式债(79 个文件,多为刻意压行的紧凑写法)记入 .prettier-baseline.json: 列明、只能减、2026-12-31 到期,新欠账一律判红(见 scripts/check_format.py)。 为什么不做全量格式化:一次性重排约 2 万行,会把"接入 CI"变成"重写前端"; 那件事留作独立提交,由人决定何时做。 验证:前端 191 个用例全过、tsc 类型检查通过、vite 构建通过、npm audit 全量 0; prettier --list-different 的输出与基线完全一致。
28 lines
638 B
JSON
28 lines
638 B
JSON
{
|
|
"name": "knowledge-governance-web",
|
|
"private": true,
|
|
"version": "0.1.0",
|
|
"type": "module",
|
|
"scripts": {
|
|
"dev": "vite --host 0.0.0.0",
|
|
"test": "vitest run",
|
|
"build": "tsc -b && vite build",
|
|
"typecheck": "tsc -b --pretty false",
|
|
"format": "prettier --write .",
|
|
"format:check": "prettier --check ."
|
|
},
|
|
"dependencies": {
|
|
"react": "19.1.1",
|
|
"react-dom": "19.1.1"
|
|
},
|
|
"devDependencies": {
|
|
"@types/react": "19.1.10",
|
|
"@types/react-dom": "19.1.7",
|
|
"@vitejs/plugin-react": "5.0.1",
|
|
"prettier": "3.9.10",
|
|
"typescript": "5.9.2",
|
|
"vite": "7.3.7",
|
|
"vitest": "5.0.3"
|
|
}
|
|
}
|