From 0be70f2f5eb42389d8e48ca61aa8cd94fcc8e000 Mon Sep 17 00:00:00 2001 From: le king fu Date: Tue, 27 Oct 2026 21:32:23 -0400 Subject: [PATCH] chore(lint): silence set-state-in-effect in TaskItem eslint-plugin-react-hooks 7.1 (pulled by eslint-config-next 16.4.3) now flags the draft-reset effect. Same justified disable as ThemeToggle; deriving the drafts from props is a refactor outside the bump. Refs #171 Co-Authored-By: Claude Opus 5.5 --- web/src/components/TaskItem.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/web/src/components/TaskItem.tsx b/web/src/components/TaskItem.tsx index faa1b8f..e4bac37 100644 --- a/web/src/components/TaskItem.tsx +++ b/web/src/components/TaskItem.tsx @@ -69,6 +69,10 @@ export function TaskItem({ task, subtasks = [], depth = 0 }: TaskItemProps) { // Sync state when task prop changes useEffect(() => { + // The edit fields are local drafts reset from the task the list reloads. + // Flagged since eslint-plugin-react-hooks 7.1 (#171); deriving the drafts + // from props instead is a refactor outside a dependency bump. + // eslint-disable-next-line react-hooks/set-state-in-effect setTitle(task.title); setNotes(task.notes || ""); setPriority(task.priority);