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:
@@ -156,7 +156,7 @@ export function CalendarShell() {
|
||||
// IANATimezone (the config's timezone type) is declared but not exported by @schedule-x/calendar,
|
||||
// so derive it from useCalendarApp's config parameter rather than importing it.
|
||||
type SxTimeZone = NonNullable<Parameters<typeof useCalendarApp>[0]['timezone']>
|
||||
const displayTimeZone = Intl.DateTimeFormat().resolvedOptions().timeZone as SxTimeZone
|
||||
const displayTimeZone: SxTimeZone = Intl.DateTimeFormat().resolvedOptions().timeZone
|
||||
|
||||
// useCalendarApp — config is stable; plugins passed as second argument
|
||||
const calendar = useCalendarApp(
|
||||
@@ -169,7 +169,7 @@ export function CalendarShell() {
|
||||
],
|
||||
defaultView,
|
||||
timezone: displayTimeZone,
|
||||
firstDayOfWeek: SX_FIRST_DAY_OF_WEEK as 7,
|
||||
firstDayOfWeek: SX_FIRST_DAY_OF_WEEK,
|
||||
calendars: calendarsConfig,
|
||||
callbacks: {
|
||||
onRangeUpdate(range) {
|
||||
@@ -197,7 +197,7 @@ export function CalendarShell() {
|
||||
useEffect(() => {
|
||||
if (!eventsQuery.data) return
|
||||
const sxEvents = hydrateEvents(eventsQuery.data.occurrences)
|
||||
eventsService.set(sxEvents as Parameters<typeof eventsService.set>[0])
|
||||
eventsService.set(sxEvents)
|
||||
}, [eventsQuery.data, eventsService])
|
||||
|
||||
// Auth redirect — one-shot full-page nav to /api/login when /api/me fails.
|
||||
@@ -351,7 +351,7 @@ export function CalendarShell() {
|
||||
color: 'var(--color-text-primary)',
|
||||
}}
|
||||
>
|
||||
Couldn't load events
|
||||
Couldn't load events
|
||||
</h2>
|
||||
<p
|
||||
style={{
|
||||
@@ -363,7 +363,7 @@ export function CalendarShell() {
|
||||
Check your connection and try again.
|
||||
</p>
|
||||
<button
|
||||
onClick={() => queryClient.refetchQueries({ queryKey: ['events'] })}
|
||||
onClick={() => { void queryClient.refetchQueries({ queryKey: ['events'] }) }}
|
||||
style={{
|
||||
background: 'var(--color-surface-dim)',
|
||||
border: '1px solid var(--color-border)',
|
||||
|
||||
Reference in New Issue
Block a user