While bumping eslint-plugin-react-hooks to v7 (ESLint 10 migration), its new React Compiler rules flagged two pre-existing patterns in frontend/src. The lint config pins the classic v5-era rules for now to keep the tooling migration behavior-neutral — these findings deserve their own fix PR:
-
src/firebase.ts:146 — probable typo bug (the real find):
const updatedUserRecord = UserRecordSchema.parse(doc.data())
if (!isEqual(updateUserRecord, userRecord)) { // <-- compares the *function* updateUserRecord
setUserRecord(updatedUserRecord)
}
updateUserRecord is a function declared later in the hook; the comparison presumably meant updatedUserRecord. As written, !isEqual(fn, record) is always true, so setUserRecord fires on every Firestore snapshot — the dedup check is a no-op. Fix: compare updatedUserRecord. Also note the effect's dep array [uid] omits its other dependencies (the pre-existing exhaustive-deps warning).
-
src/LocationWidget.tsx:132 — marker.position = ... inside useEffect mutates the Maps marker instance. Imperative mutation is how the Google Maps API works, so this is likely fine — either keep and locally disable the rule with a comment, or restructure.
After fixing, consider adopting reactHooks.configs.recommended (v7 full preset) in frontend/eslint.config.js instead of the pinned classic rules.
Found during the 2026-08-04 ESLint 10 migration; see the frontend ESLint 10 PR.
While bumping eslint-plugin-react-hooks to v7 (ESLint 10 migration), its new React Compiler rules flagged two pre-existing patterns in
frontend/src. The lint config pins the classic v5-era rules for now to keep the tooling migration behavior-neutral — these findings deserve their own fix PR:src/firebase.ts:146— probable typo bug (the real find):updateUserRecordis a function declared later in the hook; the comparison presumably meantupdatedUserRecord. As written,!isEqual(fn, record)is always true, sosetUserRecordfires on every Firestore snapshot — the dedup check is a no-op. Fix: compareupdatedUserRecord. Also note the effect's dep array[uid]omits its other dependencies (the pre-existing exhaustive-deps warning).src/LocationWidget.tsx:132—marker.position = ...insideuseEffectmutates the Maps marker instance. Imperative mutation is how the Google Maps API works, so this is likely fine — either keep and locally disable the rule with a comment, or restructure.After fixing, consider adopting
reactHooks.configs.recommended(v7 full preset) infrontend/eslint.config.jsinstead of the pinned classic rules.Found during the 2026-08-04 ESLint 10 migration; see the frontend ESLint 10 PR.