# `html-cem/no-unknown-slot`

Disallow `slot="name"` values that are not declared in the parent custom element's Custom Elements Manifest.

## Why

Children with unknown slot names get rendered into the default slot or nowhere at all, and the bug is invisible until QA. The CEM `slots[]` is the source of truth.

## Rule details

For each child element with a `slot="x"` attribute:
- If the child's parent is a known custom element with at least one declared slot, `x` must match a declared slot name.
- If the parent isn't a custom element, or the CEM declares no slots, the child is skipped (we can't reason about it without info).

The default slot is represented in the CEM as a slot with `name: ""`.

## Examples

CEM declares `my-button` with slots `[{ name: "" }, { name: "icon" }]`.

❌ Incorrect

```html
<my-button label="Hi">
  <span slot="leading"></span>
</my-button>
```

✅ Correct

```html
<my-button label="Hi">
  <span slot="icon"></span>
</my-button>
```
