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:
@@ -601,7 +601,7 @@ listItemsRouter.patch('/:itemId', zValidator('json', patchItemSchema), async (c)
|
||||
}
|
||||
|
||||
// Build the update payload — single-field write with updatedAt=NOW()
|
||||
let updateValues: {
|
||||
const updateValues: {
|
||||
checked?: boolean
|
||||
text?: string
|
||||
rank?: string
|
||||
|
||||
@@ -93,12 +93,18 @@ sseRouter.get('/lists', async (c) => {
|
||||
|
||||
// Subscribe to each accessible list's channel (D-04 — scoped, not global)
|
||||
for (const listId of accessibleListIds) {
|
||||
const unsub = subscribeListEvents(listId, async (event) => {
|
||||
if (stream.aborted) return
|
||||
await stream.writeSSE({
|
||||
data: JSON.stringify(event),
|
||||
event: event.type,
|
||||
id: `${listId}-${Date.now()}`,
|
||||
const unsub = subscribeListEvents(listId, (event) => {
|
||||
// The handler signature is void-returning; wrap the async write in void+catch.
|
||||
// writeSSE errors are non-fatal — the SSE loop detects stream.aborted and cleans up.
|
||||
void (async () => {
|
||||
if (stream.aborted) return
|
||||
await stream.writeSSE({
|
||||
data: JSON.stringify(event),
|
||||
event: event.type,
|
||||
id: `${listId}-${Date.now()}`,
|
||||
})
|
||||
})().catch((err: unknown) => {
|
||||
console.error('[sse] writeSSE error:', err)
|
||||
})
|
||||
})
|
||||
unsubscribers.push(unsub)
|
||||
|
||||
Reference in New Issue
Block a user