--- phase: 13-real-lint-gate-eslint plan: 03 type: execute wave: 3 depends_on: - 13-02 files_modified: - .gitea/workflows/ci.yml - apps/api/src/** - apps/pwa/src/** - apps/pwa/e2e/** - apps/api/tests/** autonomous: true requirements: [] must_haves: truths: - "All files are reformatted by Prettier as ONE isolated mechanical commit, separate from Plan 02's logic fixes, for reviewability (D-13-08)" - 'CI fast-checks job gains a `Format check` step running `pnpm format:check`, inserted after Lint and before Typecheck; the stale no-op lint comment is removed (SC-2)' - 'Baseline gate ends green: `pnpm lint` exits 0 AND `pnpm format:check` exits 0 across both apps (SC-3)' - 'CI lint step now genuinely blocks a PR to main on violations (no longer the --if-present no-op), and the new format:check step blocks on format violations (SC-2)' artifacts: - path: '.gitea/workflows/ci.yml' provides: 'fast-checks job with a Format check step after Lint; stale no-op comment removed' contains: 'format:check' key_links: - from: '.gitea/workflows/ci.yml fast-checks job' to: 'root package.json lint + format:check scripts' via: 'pnpm lint / pnpm format:check steps' pattern: 'pnpm format:check' --- Close the phase: (1) run Prettier across the whole repo as a single isolated reformat commit (D-13-08), (2) add the `Format check` CI step to the fast-checks job and remove the now-false no-op lint comment (SC-2), (3) assert the green baseline — `pnpm lint` AND `pnpm format:check` both exit 0 across both apps (SC-3). This is the last wave; after it, the lint+format gate is real, green, and wired into CI. Purpose: SC-3 requires the first real run's baseline to end green; SC-2 requires the CI gate to actually block PRs to main. The reformat is isolated from logic fixes (Plan 02) so the large mechanical diff is reviewable on its own. Output: reformatted tree (isolated commit), updated ci.yml, green lint + format baseline. @$HOME/.claude/gsd-core/workflows/execute-plan.md @$HOME/.claude/gsd-core/templates/summary.md @.planning/PROJECT.md @.planning/ROADMAP.md @.planning/STATE.md @.planning/phases/13-real-lint-gate-eslint/13-CONTEXT.md @.planning/phases/13-real-lint-gate-eslint/13-RESEARCH.md @.planning/phases/13-real-lint-gate-eslint/13-PATTERNS.md @.planning/phases/13-real-lint-gate-eslint/13-02-SUMMARY.md @.gitea/workflows/ci.yml No NEW files. MODIFIES: - The whole source tree (Prettier reformat — isolated commit). - `.gitea/workflows/ci.yml` — adds the `Format check` step; removes the stale 3-line no-op lint comment (ci.yml lines 28-30). This completes the phase's full artifact set across all three plans: - New config files (Plan 01): eslint.config.js, .prettierrc, .prettierignore - New scripts (Plan 01): root format/format:check + type:module; apps/api & apps/pwa lint - New CI step (Plan 03): Format check - State: lint-clean (Plan 02) + format-clean (Plan 03) baseline, green in CI. Task 1: Prettier reformat — single isolated mechanical commit (D-13-08) apps/api/src/**, apps/api/tests/**, apps/pwa/src/**, apps/pwa/e2e/**, root config files Prettier owns - 13-RESEARCH.md "Prettier Configuration" (the .prettierrc settings + .prettierignore exclusions, so you know what gets formatted and what is skipped). - 13-CONTEXT.md D-13-08 (isolate the reformat commit from logic fixes for reviewability). Run `pnpm format` (`prettier --write .`) at the repo root. This reformats every file Prettier owns, respecting `.prettierignore` (dist/, node_modules/, pnpm-lock.yaml, apps/api/src/db/migrations/, *.html are skipped). Because `.prettierrc` sets `singleQuote: true` to match the existing codebase, the diff should be whitespace/wrapping/trailing-comma churn, not a mass quote flip. This reformat MUST be its own commit, isolated from Plan 02's lint fixes (D-13-08) — do not mix any logic change into it. After formatting, run `pnpm lint` to confirm the reformat did NOT introduce any lint violation (eslint-config-prettier means ESLint does not fight Prettier, so this should stay green from Plan 02). If `pnpm lint` is non-zero after reformat, a formatting/lint conflict exists — investigate the eslint-config-prettier placement (must be last) before proceeding; do not blanket-disable. Record `git diff --stat` (file count + line churn) in the SUMMARY as evidence of the mechanical reformat. cd /home/luc/Projects/familysync && pnpm format:check && pnpm lint && echo FORMAT_AND_LINT_GREEN_AFTER_REFORMAT `pnpm format` ran; the whole tree is Prettier-clean (`pnpm format:check` exits 0) and still lint-clean (`pnpm lint` exits 0 — no eslint/prettier conflict). The reformat is staged as its own isolated commit with no logic changes mixed in. `git diff --stat` recorded in SUMMARY. The verify gate prints FORMAT_AND_LINT_GREEN_AFTER_REFORMAT. Task 2: Add CI Format check step + remove stale no-op lint comment (SC-2) .gitea/workflows/ci.yml - .gitea/workflows/ci.yml — the fast-checks job, the existing `Lint` (lines 31-32) and `Typecheck` (lines 34-35) steps, and the stale no-op comment at lines 28-30. - 13-PATTERNS.md ".gitea/workflows/ci.yml — adding a Format check step" (exact step shape + the comment to remove) + the "CI step insertion" shared pattern (`- name: Verb noun` / ` run: pnpm