Skip to content

Commit 39820b5

Browse files
committed
chore: remove dead biome-ignore comments and tighten the registry cast
The Markdown.tsx and App.tsx noExplicitAny suppressions weren't flagging anything anymore — biome had flipped them to "suppressions/ unused" warnings. Replaced the App.tsx \`as any\` with a precise \`unknown as Parameters<typeof registry.dispatch>[1]\` cast that actually types the registry injection.
1 parent 6557a7b commit 39820b5

2 files changed

Lines changed: 5 additions & 8 deletions

File tree

src/ui/App.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -166,11 +166,10 @@ function ChatApp({ bundle, onExit }: ChatAppProps) {
166166
setStatusLines([]);
167167
},
168168
exit: onExit,
169-
// Inject the registry so /help can list commands.
170-
// biome-ignore lint/suspicious/noExplicitAny: cross-cutting injection
169+
// Injecting the registry so /help can list commands without us
170+
// needing to thread it through the CommandContext type.
171171
registry,
172-
// biome-ignore lint/suspicious/noExplicitAny: cross-cutting injection
173-
} as any);
172+
} as unknown as Parameters<typeof registry.dispatch>[1]);
174173
if (result.handled) return;
175174
}
176175

src/ui/Markdown.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -187,11 +187,10 @@ function ListRow({ item, width, keyPrefix }: { item: ListItem; width: number; ke
187187
<Text>{" ".repeat(indentCols)}</Text>
188188
{lineIdx === 0 ? <Text color="cyan">{item.marker} </Text> : <Text>{" ".repeat(markerCol)}</Text>}
189189
<Box flexGrow={1}>
190-
{/* biome-ignore lint/suspicious/noArrayIndexKey: pure presentational */}
191190
<Text>
192191
{chunks.map((c, ci) => (
193-
// biome-ignore lint/suspicious/noArrayIndexKey: pure presentational
194192
<Text
193+
// biome-ignore lint/suspicious/noArrayIndexKey: ci is a stable position within a single wrapped row; reusing instances is harmless
195194
key={`${rowKey}-c${ci}`}
196195
bold={c.kind === "bold"}
197196
italic={c.kind === "italic"}
@@ -247,11 +246,10 @@ function SpanLine({
247246
if (lineIdx < wrapped.length - 1 && plain[consumed] === " ") consumed += 1;
248247
const rowKey = `${keyPrefix}-r-${lineIdx}-${line.slice(0, 12)}`;
249248
return (
250-
// biome-ignore lint/suspicious/noArrayIndexKey: pure presentational, no per-row state
251249
<Text key={rowKey}>
252250
{chunks.map((c, ci) => (
253251
<Text
254-
// biome-ignore lint/suspicious/noArrayIndexKey: pure presentational
252+
// biome-ignore lint/suspicious/noArrayIndexKey: ci is a stable position within a single wrapped row
255253
key={`${rowKey}-c${ci}`}
256254
bold={bold || c.kind === "bold"}
257255
italic={c.kind === "italic"}

0 commit comments

Comments
 (0)