# `html-cem/require-attrs`

Require attributes that the Custom Elements Manifest marks `@required`.

## Why

The CEM schema has no native `required` field. Some component libraries communicate this through a `@required` JSDoc tag, which `@cem/analyzer` preserves in the attribute's `description`. This rule reads that convention and enforces it.

## Marking an attribute required

In your component source:

```ts
/**
 * @attr {string} label - Visible button text. @required
 */
class MyButton extends HTMLElement {}
```

After running `@cem/analyzer`, the resulting `custom-elements.json` will contain:

```json
{ "name": "label", "description": "Visible button text. @required" }
```

## Examples

❌ Incorrect

```html
<my-button></my-button>
```

✅ Correct

```html
<my-button label="Save"></my-button>
```
