1
0

refactor: 精简 package.json scripts,引入 eslint-plugin-prettier 统一格式检查

删除 start/build:web/format:check,简化 check 为 typecheck+lint+test

引入 eslint-plugin-prettier 将 Prettier 集成至 ESLint,统一质量检查入口

简化 lint-staged 配置,扩展 clean 清理范围至 dist/
This commit is contained in:
2026-05-12 21:43:20 +08:00
parent 9a71b7967c
commit ad87be6956
9 changed files with 78 additions and 34 deletions

View File

@@ -6,13 +6,10 @@
"dev": "bun run scripts/dev.ts",
"dev:server": "bun --watch src/server/dev.ts",
"dev:web": "bunx --bun vite --host 127.0.0.1",
"build:web": "bunx --bun vite build",
"build": "bun run scripts/build.ts",
"start": "bun src/server/dev.ts",
"lint": "eslint .",
"format": "prettier . --write",
"format:check": "prettier . --check",
"check": "bun run typecheck && bun run lint && bun run format:check && bun test",
"check": "bun run typecheck && bun run lint && bun test",
"verify": "bun run check && bun run build && bun run test:smoke",
"test": "bun test",
"test:smoke": "bun run scripts/smoke.ts",
@@ -30,9 +27,11 @@
"@types/react-dom": "^19.2.3",
"@vitejs/plugin-react": "^6.0.1",
"eslint": "^10.3.0",
"eslint-config-prettier": "^10.1.8",
"eslint-import-resolver-typescript": "^4.4.4",
"eslint-plugin-import": "^2.32.0",
"eslint-plugin-perfectionist": "^5.9.0",
"eslint-plugin-prettier": "^5.5.5",
"eslint-plugin-react-hooks": "^7.1.1",
"eslint-plugin-react-refresh": "^0.5.2",
"husky": "^9.1.7",