open-wc / custom-elements-manifest

Custom Elements Manifest is a file format that describes custom elements in your project.
https://custom-elements-manifest.open-wc.org/
234 stars 43 forks source link

Found playground issue - "@ignore" not working with Lit @property #190

Open awmack opened 1 year ago

awmack commented 1 year ago

Playground issue

Reproduction URL: https://custom-elements-manifest.netlify.app/?source=CmltcG9ydCB7IExpdEVsZW1lbnQsIHByb3BlcnR5IH0gZnJvbSAnbGl0LWVsZW1lbnQnOwoKZXhwb3J0IGNsYXNzIE15RWxlbWVudCBleHRlbmRzIExpdEVsZW1lbnQgewogIC8qKiAKICAgKiBUaGlzIGlzIG15IGZvbyBwcm9wZXJ0eS4KICAgKiBAaWdub3JlCiAgICovCiAgQHByb3BlcnR5KCkKICBmb28gPSAnYmFyJzsKfQo%3D&library=litelement

Additional information:

I encountered this issue when working on a component with the current version of Lit (v2), though I was able to reproduce it in the playground with Lit (v1) as well. CEM analyzer crashes when I include @ignore in the JSDoc for a public property/attribute.

It's interesting that this seems to hinge on whether the property is an attribute:

Error:

/** @ignore */
@property({attribute: true})
foo = 'bar';

Not an error:

/** @ignore */
@property({attribute: false})
foo = 'bar';