- toolchain: vitest+jsdom (15 tests green: permission pure functions exhaustive, storage migration), prettier (printWidth 120 to fit the dense existing style + 700-line page budget), commitlint conventional - npm scripts: typecheck / format / test / lint:fix; build fingerprint __APP_VERSION__ (version+git hash+build time) shown in Settings > about - git hooks via core.hooksPath=frontend/.husky: pre-commit lint-staged (prettier + eslint --fix best-effort), commit-msg commitlint - permission pure functions extracted to lib/permissions.ts (single source consumed by useAuth/useLogin); AuditLogsPage filters on URL - backend: resp package unit tests; health version constant aligned with frontend package.json
4 lines
168 B
Bash
Executable File
4 lines
168 B
Bash
Executable File
#!/usr/bin/env sh
|
|
# 快修复层:staged 文件 prettier 格式化;eslint --fix 尽力修复(存量 any/空 catch 不阻塞)
|
|
cd "$(dirname "$0")/../" && npx lint-staged
|