File tree Expand file tree Collapse file tree 1 file changed +16
-24
lines changed Expand file tree Collapse file tree 1 file changed +16
-24
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:
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 >
21
- ```
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 >
31
- ```
8
+ This rule aims to disallow lacking end tags.
9
+
10
+ <eslint-code-block : rules ="{'vue/html-end-tags': [ 'error'] }" code="
11
+ < ; template> ;
12
+ < ; !-- ✓ GOOD --> ;
13
+ < ; div> ;< ; /div> ;
14
+ < ; p> ;< ; /p> ;
15
+ < ; p> ;< ; /p> ;
16
+ < ; input> ;
17
+ < ; br> ;
18
+
19
+ < ; !-- ✗ BAD --> ;
20
+ < ; div> ;
21
+ < ; p> ;
22
+ < ; /template> ;
23
+ " />
32
24
33
25
## :wrench : Options
34
26
You can’t perform that action at this time.
0 commit comments