You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/rules/component-name-in-template-casing.md
+43-33Lines changed: 43 additions & 33 deletions
Original file line number
Diff line number
Diff line change
@@ -6,68 +6,78 @@ Define a style for the component name in template casing for consistency purpose
6
6
7
7
## :book: Rule Details
8
8
9
-
:+1: Examples of **correct** code for `PascalCase`:
9
+
This rule aims to warn the tag names other than the configured casing in Vue.js template.
10
10
11
-
```html
12
-
<template>
13
-
<TheComponent />
14
-
</template>
11
+
## :wrench: Options
12
+
13
+
```json
14
+
{
15
+
"vue/component-name-in-template-casing": [
16
+
"error",
17
+
"PascalCase"| "kebab-case",
18
+
{ "ignores": [] }
19
+
]
20
+
}
15
21
```
16
22
17
-
:-1: Examples of **incorrect** code for `PascalCase`:
23
+
-`"PascalCase"` (default) ... enforce tag names to pascal case. E.g. `<CoolComponent>`. This is consistent with the JSX practice.
24
+
-`"kebab-case"` ... enforce tag names to kebab case: E.g. `<cool-component>`. This is consistent with the HTML practice which is case-insensitive originally.
25
+
-`ignores` (`string[]`) ... The element names to ignore. Sets the element name to allow. For example, a custom element or a non-Vue component.
0 commit comments