- eslint.config.mjs(flat config):react-hooks/react-refresh/tseslint;自定义 no-restricted-syntax 规则禁止 className 手拼基元类名(error 级,JSXAttribute 选择器精确限定,探针双向验证)与硬编码色值 - tsconfig:noUnusedLocals/noUnusedParameters 置 true - package.json 新增 typecheck/lint/test/verify:tokens 脚本;build 串联令牌校验(verify-tokens.sh 防止 <alpha-value> 类静默失效回归);pnpm-lock.yaml 入库供 CI --frozen-lockfile - .gitlab-ci.yml:lint/typecheck/test/build 四作业,MR 与默认分支触发,dist 产物留存一周
37 lines
1016 B
JSON
37 lines
1016 B
JSON
{
|
|
"name": "profeto-frontend",
|
|
"private": true,
|
|
"version": "0.1.0",
|
|
"type": "module",
|
|
"scripts": {
|
|
"dev": "vite",
|
|
"build": "tsc && vite build && sh scripts/verify-tokens.sh",
|
|
"preview": "vite preview",
|
|
"typecheck": "tsc --noEmit",
|
|
"lint": "eslint \"src/**/*.{ts,tsx}\"",
|
|
"test": "node --experimental-strip-types --test \"src/**/*.test.ts\"",
|
|
"verify:tokens": "sh scripts/verify-tokens.sh"
|
|
},
|
|
"dependencies": {
|
|
"react": "^18.3.1",
|
|
"react-dom": "^18.3.1",
|
|
"react-router-dom": "^6.30.6"
|
|
},
|
|
"devDependencies": {
|
|
"@eslint/js": "^10.0.1",
|
|
"@types/react": "^18.3.3",
|
|
"@types/react-dom": "^18.3.0",
|
|
"@vitejs/plugin-react": "^4.3.1",
|
|
"autoprefixer": "^10.4.19",
|
|
"eslint": "^9.39.5",
|
|
"eslint-plugin-react-hooks": "^7.1.1",
|
|
"eslint-plugin-react-refresh": "^0.5.7",
|
|
"globals": "^17.12.0",
|
|
"postcss": "^8.4.39",
|
|
"tailwindcss": "^3.4.6",
|
|
"typescript": "^5.5.3",
|
|
"typescript-eslint": "^8.70.1",
|
|
"vite": "^5.3.4"
|
|
}
|
|
}
|