runem / web-component-analyzer

CLI that analyzes web components and emits documentation
https://runem.github.io/web-component-analyzer
MIT License
500 stars 61 forks source link

Slot with `-` in the name does not have valid name #246

Closed jarrodek closed 2 years ago

jarrodek commented 2 years ago

I have two slots in my element: dropdown-trigger and dropdown-content. I documented them as:

/**
 * @slot dropdown-trigger The child that is a trigger image for the menu
 * @slot dropdown-content The child that is the content to render after opening
 */

When using the lit-plugin it shows an error when using the slots like this: slot="dropdown-content". The error message says:

Invalid slot name 'dropdown-content'. Valid slot names for <menu-button> are: 'dropdown' lit-plugin(no-unknown-slot)(2321)
jarrodek commented 2 years ago

I see my issue. I didn't put the - between the name and the documentation.