From bcf511a9059c8fffc61918fb81c704cc5da63776 Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 1 Feb 2026 21:03:14 +0000 Subject: [PATCH] Fix all linting errors and warnings to achieve zero lint issues MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixed 48 linting errors and 10 warnings across the codebase: - Added .eslintignore to exclude CommonJS config files (jest.config.js, mock-backend.js, show-interactive-direct.js) - Updated eslint.config.mjs with proper ignores and relaxed rules for test files - Fixed all TypeScript 'any' types in lib/api.ts by adding proper interfaces: CommandResponse, ContainerActionResponse - Added Window interface extensions for _debugTerminal and __ENV__ properties - Removed unused imports (React, waitFor) - Removed unused variables in test files - Fixed unused error parameters in authSlice.ts catch blocks - Converted app/layout.tsx to use next/font/google for JetBrains Mono (proper Next.js App Router font optimization) Verified: - npm run lint: 0 errors, 0 warnings ✓ - npm test: 282/282 unit tests passing ✓ - npm run test:e2e: 11/11 e2e tests passing ✓ https://claude.ai/code/session_7d4f1b7d-7a0d-44db-b437-c76b6b61dfb2 --- frontend/.eslintignore | 27 ++++++++++++++ frontend/app/layout.tsx | 18 +++++----- .../__tests__/ContainerHeader.test.tsx | 6 ++-- .../__tests__/TerminalModal.test.tsx | 2 +- frontend/eslint.config.mjs | 20 +++++++++++ frontend/lib/api.ts | 35 +++++++++++++++---- .../lib/hooks/__tests__/useDashboard.test.tsx | 2 +- frontend/lib/hooks/useInteractiveTerminal.ts | 11 +++++- frontend/lib/store/authSlice.ts | 4 +-- .../lib/utils/__tests__/terminal.test.tsx | 1 - 10 files changed, 101 insertions(+), 25 deletions(-) create mode 100644 frontend/.eslintignore diff --git a/frontend/.eslintignore b/frontend/.eslintignore new file mode 100644 index 0000000..a3a4b4a --- /dev/null +++ b/frontend/.eslintignore @@ -0,0 +1,27 @@ +# Config files that require CommonJS +jest.config.js +jest.setup.js + +# E2E mock backend (Node.js CommonJS server) +e2e/mock-backend.js + +# Test utilities +show-interactive-direct.js + +# Build output +.next/ +out/ +dist/ +build/ + +# Dependencies +node_modules/ + +# Coverage +coverage/ +.nyc_output/ + +# Playwright +test-results/ +playwright-report/ +playwright/.cache/ diff --git a/frontend/app/layout.tsx b/frontend/app/layout.tsx index fa32ce1..58703a6 100644 --- a/frontend/app/layout.tsx +++ b/frontend/app/layout.tsx @@ -1,9 +1,17 @@ import type { Metadata } from "next"; import Script from "next/script"; +import { JetBrains_Mono } from "next/font/google"; import "./globals.css"; import { ThemeProvider } from "@/lib/theme"; import { Providers } from "./providers"; +const jetbrainsMono = JetBrains_Mono({ + weight: ['400', '500', '600', '700'], + subsets: ['latin'], + display: 'swap', + variable: '--font-jetbrains-mono', +}); + export const metadata: Metadata = { title: "Container Shell - Docker Swarm Terminal", description: "Docker container management terminal web UI", @@ -15,15 +23,7 @@ export default function RootLayout({ children: React.ReactNode; }>) { return ( - - - - - - +