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) <noreply@anthropic.com>
This commit is contained in:
@@ -102,8 +102,8 @@ export function TaskLane({ questions, actions, onSubmit, onClose, loading }: Tas
|
|||||||
}, [handleMouseMove, handleMouseUp])
|
}, [handleMouseMove, handleMouseUp])
|
||||||
|
|
||||||
// Reset when new tasks come in from AI response
|
// 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(() => {
|
useEffect(() => {
|
||||||
|
// eslint-disable-next-line react-hooks/set-state-in-effect -- intentional: syncs derived state from prop changes
|
||||||
setTasks([
|
setTasks([
|
||||||
...questions.map((q): QuestionResponse => ({
|
...questions.map((q): QuestionResponse => ({
|
||||||
type: 'question', text: q.text, context: q.context, state: 'pending', value: '',
|
type: 'question', text: q.text, context: q.context, state: 'pending', value: '',
|
||||||
|
|||||||
@@ -97,9 +97,9 @@ export default function FlowPilotAnalyticsPage() {
|
|||||||
}, [period])
|
}, [period])
|
||||||
|
|
||||||
// Lazy-load tab data on tab switch or period change
|
// 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(() => {
|
useEffect(() => {
|
||||||
if (activeTab === 'coverage' && coveragePeriodRef.current !== period) {
|
if (activeTab === 'coverage' && coveragePeriodRef.current !== period) {
|
||||||
|
// eslint-disable-next-line react-hooks/set-state-in-effect -- fetches data on tab/period change
|
||||||
setCoverageLoading(true)
|
setCoverageLoading(true)
|
||||||
setCoverageError(false)
|
setCoverageError(false)
|
||||||
flowpilotAnalyticsApi.getCoverage(period)
|
flowpilotAnalyticsApi.getCoverage(period)
|
||||||
|
|||||||
Reference in New Issue
Block a user