All checks were successful
Deploy Admin Frontend / build-and-deploy (push) Successful in 13s
## 类型安全 - tsconfig: 开启 strict: true(豁免 noImplicitAny + strictNullChecks,待后续收紧) - 新建 15 个领域类型文件 (src/types/),共 ~80 个类型定义 - 统一 barrel export (src/types/index.ts) - 消除 9 个 [key: string]: any 接口 - 消除 22 个 API data: any 参数 → 替换为具体 DTO - 消除 36 个 Promise<any> → 使用具体泛型 - 消除重复 PaginatedResponse,统一使用 PaginatedResult - API 内联类型全部迁至 types/ ## 状态管理 - 引入 Zustand (zustand + persist) - 新建 src/stores/ui-store.ts — 侧边栏折叠状态持久化 - AdminLayout 接入 useUIStore ## 环境配置 - 新建 .env.example — 环境变量模板 - 新建 .env.production — 生产架构文档 - 新建 src/vite-env.d.ts — IDE 类型声明 ## 通用 UI 类型 - 新建 src/types/ui.ts — TypedColumn<T>, SortState, FilterState 等 Co-Authored-By: Claude <noreply@anthropic.com>
34 lines
822 B
JSON
34 lines
822 B
JSON
{
|
|
"compilerOptions": {
|
|
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
|
|
"target": "es2023",
|
|
"lib": ["ES2023", "DOM"],
|
|
"module": "esnext",
|
|
"types": ["vite/client"],
|
|
"skipLibCheck": true,
|
|
|
|
/* Bundler mode */
|
|
"moduleResolution": "bundler",
|
|
"allowImportingTsExtensions": true,
|
|
"verbatimModuleSyntax": true,
|
|
"moduleDetection": "force",
|
|
"noEmit": true,
|
|
"jsx": "react-jsx",
|
|
|
|
/* Strict — 渐进式收紧 */
|
|
"strict": true,
|
|
"noImplicitAny": false,
|
|
"strictNullChecks": false,
|
|
|
|
/* Linting */
|
|
"baseUrl": ".",
|
|
"paths": { "@/*": ["src/*"] },
|
|
"ignoreDeprecations": "6.0",
|
|
"noUnusedLocals": true,
|
|
"noUnusedParameters": true,
|
|
"erasableSyntaxOnly": true,
|
|
"noFallthroughCasesInSwitch": true
|
|
},
|
|
"include": ["src"]
|
|
}
|