docs(13-02): record post-verification correction — residual lint error and fix
This commit is contained in:
@@ -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.
|
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
|
## Self-Check: PASSED
|
||||||
|
|
||||||
Files verified:
|
Files verified:
|
||||||
|
|||||||
Reference in New Issue
Block a user