File tree Expand file tree Collapse file tree 1 file changed +15
-21
lines changed Expand file tree Collapse file tree 1 file changed +15
-21
lines changed Original file line number Diff line number Diff line change 5
5
6
6
## :book : Rule Details
7
7
8
- This rule reports:
8
+ This rule aims to disallow lacking end tags.
9
9
10
- - presence of and end tag on [ Void elements] ( https://www.w3.org/TR/html51/syntax.html#void-elements )
11
- - absence of both an end tag (e.g. ` </div> ` ) and a self-closing opening tag (e.g. ` <div/> ` ) on other elements
12
-
13
- :-1 : Examples of ** incorrect** code for this rule:
14
-
15
- ``` html
16
- <div >
17
- <p >
18
- <p >
19
- <input ></input >
20
- <br ></br >
10
+ <eslint-code-block :rules =" {'vue/html-end-tags': ['error']} " >
21
11
```
22
-
23
- :+1 : Examples of ** correct** code for this rule:
24
-
25
- ``` html
26
- <div ></div >
27
- <p ></p >
28
- <p ></p >
29
- <input >
30
- <br >
12
+ <template>
13
+ <!-- ✓ GOOD -->
14
+ <div></div>
15
+ <p></p>
16
+ <p></p>
17
+ <input>
18
+ <br>
19
+
20
+ <!-- ✗ BAD -->
21
+ <div>
22
+ <p>
23
+ </template>
31
24
```
25
+ </eslint-code-block >
32
26
33
27
## :wrench : Options
34
28
You can’t perform that action at this time.
0 commit comments