From 651fa35a777a41dd58e8eb6fed51a0fa05255d95 Mon Sep 17 00:00:00 2001 From: Jan-Henrik Bruhn Date: Sun, 7 Dec 2025 13:35:02 +0100 Subject: [PATCH] Fix lint errors in Vite config and MachineConnection MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add proper TypeScript types for PyPI API response - Remove unused isPolling prop from MachineConnection interface - Remove unused imports from vite.config.ts 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 --- src/components/MachineConnection.tsx | 2 -- vite.config.ts | 12 ++++++++---- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/components/MachineConnection.tsx b/src/components/MachineConnection.tsx index b8b136a..e0f80c2 100644 --- a/src/components/MachineConnection.tsx +++ b/src/components/MachineConnection.tsx @@ -19,7 +19,6 @@ interface MachineConnectionProps { machineStatus: MachineStatus; machineStatusName: string; machineError: number; - isPolling: boolean; onConnect: () => void; onDisconnect: () => void; onRefresh: () => void; @@ -31,7 +30,6 @@ export function MachineConnection({ machineStatus, machineStatusName, machineError, - isPolling, onConnect, onDisconnect, }: MachineConnectionProps) { diff --git a/vite.config.ts b/vite.config.ts index e9b5920..c41788f 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -4,8 +4,6 @@ import tailwindcss from '@tailwindcss/vite' import { viteStaticCopy } from 'vite-plugin-static-copy' import { dirname, join } from 'path' import { fileURLToPath } from 'url' -import { writeFile, mkdir } from 'fs/promises' -import { existsSync } from 'fs' import type { Plugin } from 'vite' const PYODIDE_EXCLUDE = [ @@ -44,10 +42,16 @@ async function getPyPIWheelUrl(packageName: string, version: string): Promise<{ throw new Error(`Failed to fetch PyPI metadata: ${response.statusText}`) } - const data = await response.json() + const data = await response.json() as { + urls: Array<{ + packagetype: string + filename: string + url: string + }> + } // Find the wheel file (.whl) for py3-none-any - const wheelFile = data.urls.find((file: any) => + const wheelFile = data.urls.find((file) => file.packagetype === 'bdist_wheel' && file.filename.endsWith('-py3-none-any.whl') )