From 6917d461320349c1806905dc0b1b5910c1f540ab Mon Sep 17 00:00:00 2001 From: chihlasm Date: Fri, 27 Mar 2026 16:10:36 +0000 Subject: [PATCH] fix: move eslint-disable comments to directly before setState calls eslint-disable-next-line only covers the next line, not lines further down. Moved the comments from before useEffect() to before the actual setState call inside the effect body. Co-Authored-By: Claude Opus 4.6 (1M context) --- frontend/src/components/assistant/TaskLane.tsx | 2 +- frontend/src/pages/FlowPilotAnalyticsPage.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/components/assistant/TaskLane.tsx b/frontend/src/components/assistant/TaskLane.tsx index 956291ef..80314e3b 100644 --- a/frontend/src/components/assistant/TaskLane.tsx +++ b/frontend/src/components/assistant/TaskLane.tsx @@ -102,8 +102,8 @@ export function TaskLane({ questions, actions, onSubmit, onClose, loading }: Tas }, [handleMouseMove, handleMouseUp]) // Reset when new tasks come in from AI response - // eslint-disable-next-line react-hooks/set-state-in-effect -- intentional: syncs derived state from prop changes useEffect(() => { + // eslint-disable-next-line react-hooks/set-state-in-effect -- intentional: syncs derived state from prop changes setTasks([ ...questions.map((q): QuestionResponse => ({ type: 'question', text: q.text, context: q.context, state: 'pending', value: '', diff --git a/frontend/src/pages/FlowPilotAnalyticsPage.tsx b/frontend/src/pages/FlowPilotAnalyticsPage.tsx index c0d941eb..a1e4f134 100644 --- a/frontend/src/pages/FlowPilotAnalyticsPage.tsx +++ b/frontend/src/pages/FlowPilotAnalyticsPage.tsx @@ -97,9 +97,9 @@ export default function FlowPilotAnalyticsPage() { }, [period]) // Lazy-load tab data on tab switch or period change - // eslint-disable-next-line react-hooks/set-state-in-effect -- fetches data on tab/period change useEffect(() => { if (activeTab === 'coverage' && coveragePeriodRef.current !== period) { + // eslint-disable-next-line react-hooks/set-state-in-effect -- fetches data on tab/period change setCoverageLoading(true) setCoverageError(false) flowpilotAnalyticsApi.getCoverage(period)