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 <noreply@anthropic.com>
This commit is contained in:
le king fu 2026-10-27 21:32:23 -04:00
commit 0be70f2f5e

View file

@ -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);