runem / lit-analyzer

Monorepository for tools that analyze lit-html templates
MIT License
318 stars 36 forks source link

Linting uses .js JSDOC comments rather than wca output from .ts files #363

Open bilner opened 2 months ago

bilner commented 2 months ago

In my new lit-html project lit-analyzer on both the CLI and via the ts-plugin were erroring with "no-unknown-attributes" when I was using an attribute from one of my own components.

My understanding is lit-analyzer uses web-component-analyzer to extract the meta information of the component, so I double checked the output from the TypeScript file which correctly showed the custom property/attribute.

It looks like lit-analyzer only looks at attributes defined in JSDOC in the .js file which means one needs to add both the JSDOC and transpile the component for linting to work as expected.

Is it possible to not have to use JSDOC and/or not have to compile to JS for linting to work?