fix(13-02): eliminate all ESLint violations — pnpm lint exits 0

- eslint.config.js: disable React Compiler rules (v7 flat.recommended enables
  them; codebase does not use the Compiler); add e2e/ to disableTypeChecked
  block; promote exhaustive-deps to error
- API broker: remove redundant as-casts (outboxWorker, poller, reminderScheduler,
  expand, sync, vevent, spike); add targeted ical.js no-unsafe-assignment/argument
  disables with justifying comments inside try blocks
- API routes/sse.ts: fix no-misused-promises on async writeSSE callback with
  void+IIFE+catch pattern
- API routes/lists.ts: let → const for updateValues
- API tests: remove unused imports (beforeEach, eq, vi); rename unused vars
  with _ prefix; remove unused lastActiveId assignment
- PWA components: void navigate() and void queryClient.invalidateQueries() on
  all fire-and-forget call sites; fix CalendarShell explicit-type-casts;
  Couldn't → HTML entity
- PWA test files: as unknown as Response for partial mock objects; string | null
  type annotation on mockLastSyncedUid; remove async from test callbacks without
  await; act(() => {}) not await act(async () => {}) for sync ops
- sw.ts: restructure Notification.data?.url access as let+if so disable
  comments land on the exact violation lines; void self.skipWaiting()
This commit is contained in:
Lucas Berger
2026-06-11 20:23:38 -04:00
parent 39e26561cf
commit 03e953158a
31 changed files with 176 additions and 121 deletions
+7 -5
View File
@@ -332,7 +332,7 @@ describe('EventForm', () => {
const tomorrow = new Date(today)
tomorrow.setDate(today.getDate() + 1)
const todayStr = today.toISOString().slice(0, 10)
const yesterdayStr = new Date(today.setDate(today.getDate() - 1)).toISOString().slice(0, 10)
const _yesterdayStr = new Date(today.setDate(today.getDate() - 1)).toISOString().slice(0, 10)
if (dateInputs.length >= 2) {
fireEvent.change(dateInputs[0], { target: { value: todayStr } })
@@ -462,7 +462,7 @@ describe('EventForm', () => {
eventOccurrence: EDIT_OCCURRENCE,
})
const titleInput = screen.getByPlaceholderText('Event title') as HTMLInputElement
const titleInput = screen.getByPlaceholderText<HTMLInputElement>('Event title')
expect(titleInput.value).toBe('Existing Meeting')
})
})
@@ -560,7 +560,7 @@ describe('EventForm — Plan 03-12 gap closures', () => {
)
// Title should be empty (occurrence not yet in cache)
const titleInput = screen.getByPlaceholderText('Event title') as HTMLInputElement
const titleInput = screen.getByPlaceholderText<HTMLInputElement>('Event title')
expect(titleInput.value).toBe('')
// Phase 2: occurrence arrives in cache (simulating TanStack Query resolving)
@@ -576,7 +576,7 @@ describe('EventForm — Plan 03-12 gap closures', () => {
// WR-03 fix: the reset effect must re-run because occurrence changed,
// so the title should now be populated
await waitFor(() => {
const titleInputAfter = screen.getByPlaceholderText('Event title') as HTMLInputElement
const titleInputAfter = screen.getByPlaceholderText<HTMLInputElement>('Event title')
expect(titleInputAfter.value).toBe('Late-Arriving Meeting')
})
})
@@ -676,7 +676,7 @@ describe('EventForm — Plan 03-12 gap closures', () => {
it('IN-03: todayIso is exported from calendarStore (single source of truth)', async () => {
// Use importActual to bypass the vi.mock() and test the real module export
const actualModule = await vi.importActual('../store/calendarStore.js') as Record<string, unknown>
const actualModule = await vi.importActual('../store/calendarStore.js')
expect(typeof actualModule.todayIso).toBe('function')
const result = (actualModule.todayIso as () => string)()
// Should return a YYYY-MM-DD string
@@ -950,9 +950,11 @@ describe('EventForm — Plan 06-06 end-tracking + recurrence-bound', () => {
await waitFor(() => {
expect(mockCreateEvent).toHaveBeenCalledWith(
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment -- expect.anything() returns 'any' (Vitest asymmetric matcher); safe in assertion context
expect.not.objectContaining({ recurrenceUntil: expect.anything() }),
)
expect(mockCreateEvent).toHaveBeenCalledWith(
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment -- expect.anything() returns 'any' (Vitest asymmetric matcher); safe in assertion context
expect.not.objectContaining({ recurrenceCount: expect.anything() }),
)
})