From 12385a3ce608cf57598f7837356518df700d4c68 Mon Sep 17 00:00:00 2001 From: Jerome Date: Fri, 13 Jun 2025 16:32:47 +0100 Subject: [PATCH] fix: resolve TypeScript linting errors in AuthDebugger test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replace 'any' types with proper type annotations to satisfy @typescript-eslint/no-explicit-any rule. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- client/src/components/__tests__/AuthDebugger.test.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/client/src/components/__tests__/AuthDebugger.test.tsx b/client/src/components/__tests__/AuthDebugger.test.tsx index 354e8037..b9744356 100644 --- a/client/src/components/__tests__/AuthDebugger.test.tsx +++ b/client/src/components/__tests__/AuthDebugger.test.tsx @@ -87,12 +87,12 @@ Object.defineProperty(window, "sessionStorage", { // Mock window.location in a way that works in all environments const mockLocation = { origin: "http://localhost:3000", -}; +} as Location; // Try to delete first, then redefine try { - delete (window as any).location; - window.location = mockLocation as any; + delete (window as { location?: Location }).location; + window.location = mockLocation; } catch { // If that fails, try Object.defineProperty with configurable try { @@ -103,7 +103,7 @@ try { }); } catch { // As a last resort, just assign to window.location - (window as any).location = mockLocation; + (window as { location: Location }).location = mockLocation; } }