fix: 修复类型检查报错并统一有效时间比显示
This commit is contained in:
@@ -168,7 +168,8 @@ lpt-fe/src/
|
||||
|
||||
### 提交前检查
|
||||
|
||||
- 运行 `npx vue-tsc --noEmit`、`npm run lint`(0 error 才可提交;`no-explicit-any` 允许存量警告,新代码避免 any)、`npm run test`、`npm run build`。
|
||||
- 运行 `npm run type-check`、`npm run lint`(0 error 才可提交;`no-explicit-any` 允许存量警告,新代码避免 any)、`npm run test`、`npm run build`。
|
||||
- **不要用 `npx vue-tsc --noEmit` 作为检查手段**:`tsconfig.json` 是 solution 风格(`files: []` + 仅 `references`),该命令会解析到根配置而检查 0 个源文件,永远假绿。Docker 构建跑的是 `npm run type-check`(`vue-tsc --build --force`,走 project references),只有它才真正校验。
|
||||
- 提交信息按 Git 提交规范使用中文短句;样式类改动用 `style:`,清理类用 `refactor:` / `chore:`。
|
||||
|
||||
## 开发配置
|
||||
@@ -185,7 +186,7 @@ npm run dev
|
||||
npm run build
|
||||
npm run test
|
||||
npm run test:e2e
|
||||
npx vue-tsc --noEmit
|
||||
npm run type-check
|
||||
npm run lint
|
||||
npm run test:coverage
|
||||
```
|
||||
@@ -194,7 +195,7 @@ npm run test:coverage
|
||||
|
||||
```bash
|
||||
npx vite build
|
||||
npx vue-tsc --noEmit
|
||||
npm run type-check
|
||||
```
|
||||
|
||||
## Docker
|
||||
|
||||
Reference in New Issue
Block a user