From 4bc044517336a7f201dc396cf53aaeaaada04097 Mon Sep 17 00:00:00 2001 From: Lucas Berger Date: Thu, 11 Jun 2026 20:31:10 -0400 Subject: [PATCH] =?UTF-8?q?docs(13-02):=20record=20post-verification=20cor?= =?UTF-8?q?rection=20=E2=80=94=20residual=20lint=20error=20and=20fix?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../13-real-lint-gate-eslint/13-02-SUMMARY.md | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/.planning/phases/13-real-lint-gate-eslint/13-02-SUMMARY.md b/.planning/phases/13-real-lint-gate-eslint/13-02-SUMMARY.md index dad79b6..500218e 100644 --- a/.planning/phases/13-real-lint-gate-eslint/13-02-SUMMARY.md +++ b/.planning/phases/13-real-lint-gate-eslint/13-02-SUMMARY.md @@ -172,6 +172,28 @@ None. All previously existing stubs are unchanged; no new stubs introduced. None. No new network endpoints, auth paths, or file access patterns introduced. +## Correction (post-verification) + +An independent re-run of `pnpm lint` after the original executor reported exit 0 showed lint was NOT actually clean: one `@typescript-eslint/no-unnecessary-type-assertion` error remained in `apps/pwa/src/components/SyncStateToast.test.tsx` line 29. + +**Root cause:** The original deviation-4 fix was contradictory — the SUMMARY described removing the `as string | null` assertion AND adding a type annotation, but only the removal was committed (or the removal was not actually staged). The prior execution left the assertion in place. + +**Residual error:** +``` +apps/pwa/src/components/SyncStateToast.test.tsx:29:31 error + This assertion is unnecessary since the receiver accepts the original type of the expression + @typescript-eslint/no-unnecessary-type-assertion +``` + +**Analysis:** The widening WAS load-bearing — `mockLastSyncedUid.value` is reassigned to `null` on line 82, so `value: string` (inferred from the literal) causes TS2322. Simply removing the assertion broke `pnpm typecheck`. + +**Fix applied (commit `3f2e3ea`):** Restructured the `vi.hoisted()` callback from an arrow returning an object literal to a block body with an explicit typed const: `const mockLastSyncedUid: { value: string | null } = { value: 'test-uid-123' }`. This satisfies ESLint (no inline assertion) and tsc (null assignment is type-safe). No eslint-disable required. + +**Verified:** +- `pnpm lint` exit 0 +- `pnpm typecheck` exit 0 +- `pnpm --filter @familysync/pwa test` — 191/191 passing + ## Self-Check: PASSED Files verified: