🧹 Remove explicit any on window in Hero.astro#1036
🧹 Remove explicit any on window in Hero.astro#1036kuasar-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 explicit
window as anycast and its associatedeslint-disableoverride have been removed fromsrc/components/features/home/Hero.astro. To support type safety,__heroInitHandlerhas been properly declared on the globalWindowinterface insrc/env.d.ts.💡 Why: Relying on
anybypasses TypeScript checks and makes the code less robust to refactoring. By extending the built-inWindowinterface directly, we improve code health, ensure the listener's types are checked appropriately globally, and remove unnecessary eslint ignores.✅ Verification:
src/env.d.tsandsrc/components/features/home/Hero.astro.pnpm run check(formatter, linter, and type checker) locally. All passed successfully.pnpm run buildlocally, completing without issues.pnpm run test:e2e. All E2E tests passed.✨ Result: A safer, more robust implementation without an explicit type override or linting ignore, adhering to the codebase's existing pattern of global interface augmentation.
PR created automatically by Jules for task 10428157274451334835 started by @kuasar-mknd