fix(13-03): exclude .planning from Prettier so the format gate stays green
GSD planning artifacts (.planning/**) are rewritten by tooling on every workflow run and are never hand-formatted. Including them in Prettier scope caused pnpm format:check to exit 1 on virtually every future PR, making the SC-3 green baseline impossible to hold. Add .planning/ to .prettierignore, mirroring the same rationale as dist/ and apps/api/src/db/migrations/. Real source docs (README.md, docs/**) remain in Prettier scope. No playwright-report/, test-results/, or coverage/ directories exist to ignore.
This commit is contained in:
@@ -120,3 +120,27 @@ Green baseline verified:
|
||||
- `pnpm format:check` — exit 0
|
||||
- `pnpm typecheck` — exit 0
|
||||
- `pnpm --filter @familysync/pwa test` — 191/191 passing
|
||||
|
||||
## Correction (post-verification)
|
||||
|
||||
**Gap found:** An independent re-run of `pnpm format:check` after the initial plan execution exited 1, not 0. Three GSD-managed files were not Prettier-formatted:
|
||||
|
||||
- `.planning/phases/13-real-lint-gate-eslint/13-03-SUMMARY.md`
|
||||
- `.planning/ROADMAP.md`
|
||||
- `.planning/STATE.md`
|
||||
|
||||
**Root cause:** `.planning/` was not in `.prettierignore`. GSD rewrites these planning docs on every workflow run (after every plan execution, state updates, roadmap sync, etc.) and never applies Prettier formatting to them. Including them in Prettier scope means the format gate fails on virtually every future PR, making SC-3 ("baseline gate ends green") impossible to hold in practice.
|
||||
|
||||
**Fix applied:** Added `.planning/` to `.prettierignore` with an explanatory comment. This mirrors the existing rationale for `dist/` and `apps/api/src/db/migrations/` — tool-generated output that must not gate Prettier. Real source docs (README.md, docs/**) remain in Prettier scope; they were reformatted in commit 982438d and stay formatted.
|
||||
|
||||
No other generated paths required ignoring — `playwright-report/`, `test-results/`, and `coverage/` directories do not exist on this tree.
|
||||
|
||||
**Verified exit codes after fix:**
|
||||
|
||||
| Command | Exit Code |
|
||||
|---------|-----------|
|
||||
| `pnpm format:check` | 0 |
|
||||
| `pnpm lint` | 0 |
|
||||
| `pnpm typecheck` | 0 |
|
||||
|
||||
**Commit:** `fix(13-03): exclude .planning from Prettier so the format gate stays green`
|
||||
|
||||
@@ -3,3 +3,6 @@ node_modules/
|
||||
pnpm-lock.yaml
|
||||
apps/api/src/db/migrations/
|
||||
*.html
|
||||
# GSD planning artifacts — tool-generated and rewritten on every workflow run;
|
||||
# never hand-formatted; must not gate Prettier (same rationale as dist/).
|
||||
.planning/
|
||||
|
||||
Reference in New Issue
Block a user