File tree Expand file tree Collapse file tree 1 file changed +12
-10
lines changed Expand file tree Collapse file tree 1 file changed +12
-10
lines changed Original file line number Diff line number Diff line change 2
2
3
3
- :gear : This rule is included in all of ` "plugin:vue/essential" ` , ` "plugin:vue/strongly-recommended" ` and ` "plugin:vue/recommended" ` .
4
4
5
- This rule aims to enforce render function to always return value
6
-
7
5
## :book : Rule Details
8
6
9
- : -1 : Examples of ** incorrect ** code for this rule:
7
+ This rule aims to enforce render function to always return value
10
8
11
- ``` js
12
- export default {
13
- render () {}
14
- }
15
- ```
9
+ :-1 : Examples of ** incorrect** code for this rule:
16
10
17
- ``` js
11
+ <eslint-code-block :rules =" {'vue/require-render-return': ['error']} " >
12
+ ``` vue
13
+ <script>
18
14
export default {
19
15
render (h) {
20
16
if (foo) {
21
17
return h('div', 'hello')
22
18
}
23
19
}
24
20
}
21
+ </script>
25
22
```
23
+ </eslint-code-block >
26
24
27
25
:+1 : Examples of ** correct** code for this rule:
28
26
29
- ``` js
27
+ <eslint-code-block :rules =" {'vue/require-render-return': ['error']} " >
28
+ ``` vue
29
+ <script>
30
30
export default {
31
31
render (h) {
32
32
return h('div', 'hello')
33
33
}
34
34
}
35
+ </script>
35
36
```
37
+ </eslint-code-block >
36
38
37
39
## :wrench : Options
38
40
You can’t perform that action at this time.
0 commit comments