Skip to content

Commit

Permalink
docs: update
Browse files Browse the repository at this point in the history
  • Loading branch information
waynzh committed Nov 16, 2024
1 parent 235076b commit 3f1ea34
Showing 1 changed file with 30 additions and 3 deletions.
33 changes: 30 additions & 3 deletions docs/rules/valid-component-name.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,48 @@ description: enforce consistency in component names

## :book: Rule Details

This rule ....
This rule enforces consistency in component names.

<eslint-code-block :rules="{'vue/valid-component-name': ['error']}">
<eslint-code-block :rules="{ 'vue/valid-component-name': ['error'] }">

```vue
<template>
<!-- ✓ GOOD -->
<button/>
<keep-alive></keep-alive>
<!-- ✗ BAD -->
<custom-component />
</template>
```

</eslint-code-block>

## :wrench: Options

Nothing.
```json
{
"vue/valid-component-name": ["error", {
"allow": []
}]
}
```

### `"allow"`

<eslint-code-block :rules="{'vue/valid-component-name': ['error', { 'allow': ['/^custom-/'] }]}">

```vue
<template>
<!-- ✓ GOOD -->
<custom-component />
<!-- ✗ BAD -->
<my-component />
</template>
```

</eslint-code-block>

## :mag: Implementation

Expand Down

0 comments on commit 3f1ea34

Please sign in to comment.