ota-meshi/eslint-plugin-astro

Question about JSX like element definitions

high1 opened this issue · 3 comments

high1 commented

I'm using @typescript-eslint to parse Astro components, and I'm getting this error when using dynamic JSX expressions:
image
I suppose that this is caused by missing definitions for JSX like elements in astro? Is there a way to reference the definitions in Astro? I can fix this using type assertions with HTMLAnchorELement, but it would be better if the definitions were already inferred...

env.d.ts references these types

/// <reference types="astro/client" />
/// <reference types="astro/env" />
/// <reference types="svelte" />

Thanks for this plugin, btw, and all the other ones - I'm using quite a few of them...

I'm not familiar with typescript so I'm not sure. Could you share your repository for me to debug?

high1 commented

I'll make a repro as soon as I can.

high1 commented

Tried to reproduce the issue on a fresh project, with the same configuration - started with the new astro starter, and haven't been able to.
image
I'm closing the issue since I can't repeat it consistently.