Skip to content

Commit 40de2a3

Browse files
committed
update html-end-tags
1 parent b4f654b commit 40de2a3

File tree

1 file changed

+15
-21
lines changed

1 file changed

+15
-21
lines changed

docs/rules/html-end-tags.md

Lines changed: 15 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -5,30 +5,24 @@
55

66
## :book: Rule Details
77

8-
This rule reports:
8+
This rule aims to disallow lacking end tags.
99

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']}">
2111
```
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>
3124
```
25+
</eslint-code-block>
3226

3327
## :wrench: Options
3428

0 commit comments

Comments
 (0)