From 410cb8a10fbbd5639d6b0da948704e6d4d166e5b Mon Sep 17 00:00:00 2001 From: iliya Date: Fri, 6 Mar 2026 00:02:27 +0200 Subject: [PATCH] fix: address linting issues in LeadThoughtsGroup and TaskAttachments components - Added an eslint-disable comment in LeadThoughtsGroupRow to clarify intentional state updates in useEffect. - Removed unnecessary eslint-disable comment in TaskAttachments to clean up the codebase. --- src/renderer/components/team/activity/LeadThoughtsGroup.tsx | 1 + src/renderer/components/team/dialogs/TaskAttachments.tsx | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/src/renderer/components/team/activity/LeadThoughtsGroup.tsx b/src/renderer/components/team/activity/LeadThoughtsGroup.tsx index 1ffaad78..fcf9b849 100644 --- a/src/renderer/components/team/activity/LeadThoughtsGroup.tsx +++ b/src/renderer/components/team/activity/LeadThoughtsGroup.tsx @@ -139,6 +139,7 @@ export const LeadThoughtsGroupRow = ({ const [isLive, setIsLive] = useState(computeIsLive); useEffect(() => { + // eslint-disable-next-line react-hooks/set-state-in-effect -- intentional immediate sync to avoid 1s stale gap setIsLive(computeIsLive()); const id = window.setInterval(() => setIsLive(computeIsLive()), 1000); return () => window.clearInterval(id); diff --git a/src/renderer/components/team/dialogs/TaskAttachments.tsx b/src/renderer/components/team/dialogs/TaskAttachments.tsx index 39863d44..5c48993f 100644 --- a/src/renderer/components/team/dialogs/TaskAttachments.tsx +++ b/src/renderer/components/team/dialogs/TaskAttachments.tsx @@ -219,7 +219,6 @@ export const TaskAttachments = ({ void handlePreview(att); }} onDelete={() => { - // eslint-disable-next-line sonarjs/void-use -- void needed to mark floating promise void handleDelete(att.id, att.mimeType); }} onDataLoaded={handleThumbLoaded}