Final ESLint warning bucket of the dette-tech sprint. 49 warnings
across 41 files, fixed per case based on context :
~17 cases — added the missing dep, wrapping the upstream helper
in useCallback at its definition so the new [fn]
entry is stable. Files: DeveloperDashboardView,
WebhooksView, CloudBrowserView, GearDocumentsTab,
GearRepairsTab, PlaybackSummary, UploadQuota, Dialog,
SwaggerUI, MarketplacePage, etc.
~5 cases — extracted complex expression to its own useMemo so
the outer hook's deps array is statically checkable.
ChatMessages.conversationMessages,
useGearView.sourceItems, useLibraryPage.tracks,
usePlaylistNotifications.playlistNotifications,
ChatRoom.conversationMessages.
~5 cases — inline ref-pattern when the upstream hook returns a
freshly-allocated object every render
(ToastProvider's addToast, parent prop callbacks
that aren't memoized). Captured into a ref so the
effect's deps stay stable.
~5 cases — ref-cleanup pattern for animation-frame ids :
capture .current at cleanup time into a local that
the closure closes over (per React docs).
~13 cases — suppressed per-line with specific reason : mount-only
inits, recursive callback pairs (usePlaybackRealtime
connect↔reconnect), Zustand-store identity stability,
search loops, decorator construction (storybook).
Every comment names WHY the dep isn't safe to add.
1 case — dropped a dep that was unnecessary (useChat had a
setActiveCall in deps that the body didn't use).
1 case — replaced 8 granular player.* deps with the parent
[player] object (useKeyboardShortcuts).
baseline post-commit : 754 warnings, 0 errors, 0 TS errors. The
remaining 754 are entirely no-restricted-syntax — design-system
guardrails (Tailwind defaults / hex literals / native <button>) —
which are per-feature migration work, not lint-sprint fodder.
CI --max-warnings lowered to 754. Trajectory of the sprint :
1240 → 1108 → 921 → 803 → 754
(-486 warnings = -39%)
Latent issue surfaced (not fixed in this commit, flagged for v1.1) :
ToastProvider's `useToast` and useSearchHistory's `addToHistory`
return new objects every render, so anything that depends on them
in a useEffect would re-fire on every parent render. Today these
are routed through refs at the call site ; the structural fix is to
memoize the providers themselves. Documented in the suppression
comments at the affected sites.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>