From 64aca507aff299b7874ae5ee22d775841936cd3b Mon Sep 17 00:00:00 2001 From: everysingletear Date: Sat, 15 Aug 2026 17:02:02 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20ChoresOverview=20does=20not=20parse=20?= =?UTF-8?q?=E2=80=94=20hook=20inserted=20into=20an=20object=20literal?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `CHORE_STATUS` is a module-level object literal, and a `useTranslation` call ended up inside it: const CHORE_STATUS = { const { t } = useTranslation('chores') NO_DUE_DATE: 'No due date', That is a syntax error, so the file cannot be parsed at all. It does not break the build because nothing imports `ChoresOverview` — vite never compiles it — but it breaks eslint, editors, and anything else that walks the whole tree. The hook moves into the component, which is where the file's `t()` calls actually live. This one arrived with #210, the same way #216 brought the ActivitiesCard crash: my tooling wrote the hook in mechanically and nothing downstream parsed the result. Both are now covered by the `no-undef` pass I described in the other commit — it reports the parse error too. --- src/views/ChoresOverview.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/ChoresOverview.jsx b/src/views/ChoresOverview.jsx index 92cf309..1d8bef3 100644 --- a/src/views/ChoresOverview.jsx +++ b/src/views/ChoresOverview.jsx @@ -33,7 +33,6 @@ import DateModal from './Modals/Inputs/DateModal' // enum for chore status: const CHORE_STATUS = { - const { t } = useTranslation('chores') NO_DUE_DATE: 'No due date', DUE_SOON: 'Soon', DUE_NOW: 'Due', @@ -41,6 +40,7 @@ const CHORE_STATUS = { } const ChoresOverview = () => { + const { t } = useTranslation('chores') const [chores, setChores] = useState([]) const [filteredChores, setFilteredChores] = useState([]) const [performers, setPerformers] = useState([])