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
-:gear: This rule is included in all of `"plugin:vue/essential"`, `"plugin:vue/strongly-recommended"` and `"plugin:vue/recommended"`.
4
+
5
+
This rule reports components that haven't been used in the template.
6
+
7
+
## :book: Rule Details
8
+
9
+
:-1: Examples of **incorrect** code for this rule:
10
+
11
+
```html
12
+
<template>
13
+
<div>
14
+
<h2>Lorem ipsum</h2>
15
+
<TheModal />
16
+
</div>
17
+
</template>
18
+
19
+
<script>
20
+
importTheButtonfrom'components/TheButton.vue'
21
+
importTheModalfrom'components/TheModal.vue'
22
+
23
+
exportdefault {
24
+
components: {
25
+
TheButton // Unused component
26
+
'the-modal': TheModal // Unused component
27
+
}
28
+
}
29
+
</script>
30
+
```
31
+
32
+
Note that components registered under other than `PascalCase` name have to be called directly under the specified name, whereas if you register it using `PascalCase` you can call it however you like, except using `snake_case`.
0 commit comments