File tree Expand file tree Collapse file tree 1 file changed +25
-23
lines changed Expand file tree Collapse file tree 1 file changed +25
-23
lines changed Original file line number Diff line number Diff line change @@ -15,37 +15,39 @@ This rule enforces the quotes style of HTML attributes.
15
15
16
16
This rule reports the quotes of attributes if it is different to configured quotes.
17
17
18
- :-1 : Examples of ** incorrect** code for this rule:
19
-
20
- ``` html
21
- <img src =' ./logo.png' >
22
- <img src =./logo.png >
18
+ <eslint-code-block :rules =" {'vue/html-quotes': ['error']} " >
23
19
```
24
-
25
- :+1 : Examples of ** correct** code for this rule:
26
-
27
- ``` html
28
- <img src =" ./logo.png" >
29
- ```
30
-
31
- :-1 : Examples of ** incorrect** code for this rule with ` "single" ` option:
32
-
33
- ``` html
34
- <img src =" ./logo.png" >
35
- <img src =./logo.png >
36
- ```
37
-
38
- :+1 : Examples of ** correct** code for this rule with ` "single" ` option:
39
-
40
- ``` html
41
- <img src =' ./logo.png' >
20
+ <template>
21
+ <!-- ✓ GOOD -->
22
+ <img src="./logo.png">
23
+
24
+ <!-- ✗ BAD -->
25
+ <img src='./logo.png'>
26
+ <img src=./logo.png>
27
+ </template>
42
28
```
29
+ </eslint-code-block >
43
30
44
31
## :wrench : Options
45
32
46
33
- ` "double" ` (default) ... requires double quotes.
47
34
- ` "single" ` ... requires single quotes.
48
35
36
+ ### ` "single" `
37
+
38
+ <eslint-code-block :rules =" {'vue/html-quotes': ['error', 'single']} " >
39
+ ```
40
+ <template>
41
+ <!-- ✓ GOOD -->
42
+ <img src='./logo.png'>
43
+
44
+ <!-- ✗ BAD -->
45
+ <img src="./logo.png">
46
+ <img src=./logo.png>
47
+ </template>
48
+ ```
49
+ </eslint-code-block >
50
+
49
51
## :mag : Implementation
50
52
51
53
- [ Rule source] ( https://github.com/vuejs/eslint-plugin-vue/blob/master/lib/rules/html-quotes.js )
You can’t perform that action at this time.
0 commit comments