chore(frontend): engineering baseline per guide ch.8

- 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
This commit is contained in:
Logan.Li committed 2026-10-26 17:58:59 +08:00
1 parent ac498c7ba2
commit d867c276d4
8 files changed
+1761 -23

No files matched your search

+3
View File
@@ -0,0 +1,3 @@
#!/usr/bin/env sh
# Conventional Commits 校验(类型集:feat/fix/docs/style/refactor/perf/test/chore/revert)
cd "$(dirname "$0")/../" && npx --no -- commitlint --edit "$1"