🧹 [code health improvement] Augment Window type to replace 'window as any' castings#1045
🧹 [code health improvement] Augment Window type to replace 'window as any' castings#1045kuasar-mknd wants to merge 1 commit intomasterfrom
Conversation
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
🎯 What: The global
Windowinterface was extended insrc/env.d.tsto include strongly-typed custom properties used across multiple components. This allowed the complete removal of unsafewindow as anytype assertions and// eslint-disable-next-line @typescript-eslint/no-explicit-anycomments throughout the codebase.💡 Why: Relying on explicit
anycasting bypasses the TypeScript compiler, leaving the code vulnerable to typos and type mismatches. Defining the custom properties directly on the globalWindowinterface improves type safety, developer experience (through IDE autocompletion), and overall maintainability.✅ Verification: Verified by compiling the application (
pnpm run build), running the TypeScript compiler (pnpm run typecheck), linting (pnpm run lint), and successfully running the e2e Playwright test suite.✨ Result: A safer, cleaner, and strictly typed codebase with 0
eslint-disableworkarounds regarding window accesses.PR created automatically by Jules for task 11506260394677494612 started by @kuasar-mknd