From ea371bc7ed86769286947181e4c4374382954fda Mon Sep 17 00:00:00 2001 From: yue <125123863+mmmself@users.noreply.github.com> Date: Sun, 5 Jul 2026 17:40:01 +0800 Subject: [PATCH 1/2] fix: re-enable noArrayIndexKey, noPrototypeBuiltins, noCommaOperator lint rules Closes #118 (partial) - Enable suspicious/noArrayIndexKey, suspicious/noPrototypeBuiltins, complexity/noCommaOperator as error in biome.json - Replace Object.prototype.hasOwnProperty.call() with Object.hasOwn() in editmode.ts - Fix noArrayIndexKey in FilesTabView.tsx (suppress with biome-ignore for static document lines) - Fix noArrayIndexKey in WorkingCard.tsx (use todo.text as stable key) - Fix noArrayIndexKey in primitives.tsx (use warning text as key, remove stale eslint-disable comments) - noCommaOperator: zero violations already, rule enabled cleanly --- apps/desktop/src/renderer/src/components/FilesTabView.tsx | 1 + .../src/renderer/src/components/chat/WorkingCard.tsx | 4 ++-- .../src/renderer/src/components/settings/primitives.tsx | 6 ++---- biome.json | 6 +++--- packages/shared/src/editmode.ts | 2 +- 5 files changed, 9 insertions(+), 10 deletions(-) diff --git a/apps/desktop/src/renderer/src/components/FilesTabView.tsx b/apps/desktop/src/renderer/src/components/FilesTabView.tsx index 5e7c0c6d..151ab983 100644 --- a/apps/desktop/src/renderer/src/components/FilesTabView.tsx +++ b/apps/desktop/src/renderer/src/components/FilesTabView.tsx @@ -1307,6 +1307,7 @@ function DocumentFilePreview({
{section.lines.map((line, index) => ( + // biome-ignore lint/suspicious/noArrayIndexKey: static document reading, lines never reorder

{line}

diff --git a/apps/desktop/src/renderer/src/components/chat/WorkingCard.tsx b/apps/desktop/src/renderer/src/components/chat/WorkingCard.tsx index 12278ca0..2033cd29 100644 --- a/apps/desktop/src/renderer/src/components/chat/WorkingCard.tsx +++ b/apps/desktop/src/renderer/src/components/chat/WorkingCard.tsx @@ -610,9 +610,9 @@ function ActivityTodoBlock({ row }: { row: ActivityRow }) { />
- {todos.map((todo, index) => ( + {todos.map((todo) => (
{todo.status === 'completed' ? ( diff --git a/apps/desktop/src/renderer/src/components/settings/primitives.tsx b/apps/desktop/src/renderer/src/components/settings/primitives.tsx index 8c5e4e97..a233ed6a 100644 --- a/apps/desktop/src/renderer/src/components/settings/primitives.tsx +++ b/apps/desktop/src/renderer/src/components/settings/primitives.tsx @@ -708,11 +708,9 @@ export function WarningsList({ warnings }: { warnings: string[] }) { const overflow = warnings.length - shown.length; return (