Skip to content

Commit 303d5b9

Browse files
committed
update no-unused-vars
1 parent 1f3770f commit 303d5b9

File tree

1 file changed

+9
-13
lines changed

1 file changed

+9
-13
lines changed

docs/rules/no-unused-vars.md

+9-13
Original file line numberDiff line numberDiff line change
@@ -2,29 +2,25 @@
22

33
- :gear: This rule is included in all of `"plugin:vue/essential"`, `"plugin:vue/strongly-recommended"` and `"plugin:vue/recommended"`.
44

5-
This rule report variable definitions of v-for directives or scope attributes if those are not used.
6-
75
## :book: Rule Details
86

9-
:-1: Examples of **incorrect** code for this rule:
7+
This rule report variable definitions of v-for directives or scope attributes if those are not used.
108

11-
```html
9+
<eslint-code-block :rules="{'vue/no-unused-vars': ['error']}">
10+
```
1211
<template>
13-
<ol v-for="i in 5"><!-- "i" is defined but never used. -->
14-
<li>item</li>
12+
<!-- ✓ GOOD -->
13+
<ol v-for="i in 5">
14+
<li>{{ i }}</li>
1515
</ol>
16-
</template>
17-
```
18-
19-
:+1: Examples of **correct** code for this rule:
2016
21-
```html
22-
<template>
17+
<!-- ✗ BAD -->
2318
<ol v-for="i in 5">
24-
<li>{{i}}</li><!-- "i" is defined and used. -->
19+
<li>item</li>
2520
</ol>
2621
</template>
2722
```
23+
</eslint-code-block>
2824

2925
## :wrench: Options
3026

0 commit comments

Comments
 (0)