From 01cb4950456fd6615a701a16f53a8e55be52720c Mon Sep 17 00:00:00 2001 From: Brian Love Date: Thu, 9 Apr 2026 23:16:51 -0700 Subject: [PATCH] =?UTF-8?q?fix(website):=20resolve=20all=2027=20lint=20war?= =?UTF-8?q?nings=20=E2=80=94=20zero=20warnings?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - hello/route.ts: remove unused _request parameter - ArchFlowDiagram.tsx: remove unused loop var, eliminate non-null assertions - MdxRenderer.tsx: eslint-disable for unavoidable rehype plugin any cast - ChatFeaturesSection.tsx: guard msgsRef.current, use optional chaining - generate-api-docs.ts: eslint-disable file for untyped TypeDoc reflection API Co-Authored-By: Claude Opus 4.6 --- apps/website/scripts/generate-api-docs.ts | 1 + apps/website/src/app/api/hello/route.ts | 2 +- apps/website/src/components/docs/ArchFlowDiagram.tsx | 11 ++++++----- apps/website/src/components/docs/MdxRenderer.tsx | 3 ++- .../src/components/landing/ChatFeaturesSection.tsx | 5 +++-- 5 files changed, 13 insertions(+), 9 deletions(-) diff --git a/apps/website/scripts/generate-api-docs.ts b/apps/website/scripts/generate-api-docs.ts index 81f3dfa7e..b8ca0069d 100644 --- a/apps/website/scripts/generate-api-docs.ts +++ b/apps/website/scripts/generate-api-docs.ts @@ -1,3 +1,4 @@ +/* eslint-disable @typescript-eslint/no-explicit-any -- TypeDoc reflection API is untyped */ import { Application, TSConfigReader, ReflectionKind } from 'typedoc'; import fs from 'fs'; import path from 'path'; diff --git a/apps/website/src/app/api/hello/route.ts b/apps/website/src/app/api/hello/route.ts index fcbfd9eb6..3bbf325cb 100644 --- a/apps/website/src/app/api/hello/route.ts +++ b/apps/website/src/app/api/hello/route.ts @@ -1,3 +1,3 @@ -export async function GET(_request: Request) { +export async function GET() { return new Response('Hello, from API!'); } diff --git a/apps/website/src/components/docs/ArchFlowDiagram.tsx b/apps/website/src/components/docs/ArchFlowDiagram.tsx index c29428356..5c90ecd27 100644 --- a/apps/website/src/components/docs/ArchFlowDiagram.tsx +++ b/apps/website/src/components/docs/ArchFlowDiagram.tsx @@ -43,18 +43,19 @@ export function ArchFlowDiagram() { setLogs([]); setBubbles([]); - SCENARIO.forEach((step, i) => { + SCENARIO.forEach((step) => { timeouts.push(setTimeout(() => { setLogs(prev => [...prev, step.log]); if (step.chatBubble) { + const bubble = step.chatBubble; setBubbles(prev => { - const existing = prev.findIndex(b => b.role === step.chatBubble!.role && b.role === 'assistant'); - if (existing >= 0 && step.chatBubble!.role === 'assistant') { + const existing = prev.findIndex(b => b.role === bubble.role && b.role === 'assistant'); + if (existing >= 0 && bubble.role === 'assistant') { const updated = [...prev]; - updated[existing] = step.chatBubble!; + updated[existing] = bubble; return updated; } - return [...prev, step.chatBubble!]; + return [...prev, bubble]; }); } if (logRef.current) logRef.current.scrollTop = logRef.current.scrollHeight; diff --git a/apps/website/src/components/docs/MdxRenderer.tsx b/apps/website/src/components/docs/MdxRenderer.tsx index aa367893c..ab6c65e8e 100644 --- a/apps/website/src/components/docs/MdxRenderer.tsx +++ b/apps/website/src/components/docs/MdxRenderer.tsx @@ -59,7 +59,8 @@ export function MdxRenderer({ source, library, section, slug, title }: MdxRender options={{ mdxOptions: { remarkPlugins: [remarkGfm], - rehypePlugins: [rehypeSlug, [rehypePrettyCode, rehypeOptions] as any], + // eslint-disable-next-line @typescript-eslint/no-explicit-any + rehypePlugins: [rehypeSlug, [rehypePrettyCode, rehypeOptions] as any], }, }} /> diff --git a/apps/website/src/components/landing/ChatFeaturesSection.tsx b/apps/website/src/components/landing/ChatFeaturesSection.tsx index 6bee7632e..f02485e38 100644 --- a/apps/website/src/components/landing/ChatFeaturesSection.tsx +++ b/apps/website/src/components/landing/ChatFeaturesSection.tsx @@ -212,7 +212,8 @@ export function ChatFeaturesSection() { const msgsRef = useRef(null); const buildCtx = useCallback((token: number): ScenarioCtx => { - const msgs = msgsRef.current!; + const msgs = msgsRef.current; + if (!msgs) return {} as ScenarioCtx; const scroll = () => { msgs.scrollTop = msgs.scrollHeight; }; const addUser = (text: string) => { @@ -259,7 +260,7 @@ export function ChatFeaturesSection() { for (const ch of text) { if (tokenRef.current !== token) return; const s = document.createElement('span'); s.textContent = ch; - out.parentNode!.insertBefore(s, cur); + out.parentNode?.insertBefore(s, cur); scroll(); await wait(ms); }