File tree Expand file tree Collapse file tree 3 files changed +4
-5
lines changed Expand file tree Collapse file tree 3 files changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -20,16 +20,15 @@ function create (context) {
20
20
utils . executeOnVue ( context , obj => {
21
21
const node = obj . properties . find ( item => item . type === 'Property' &&
22
22
utils . getStaticPropertyName ( item ) === 'render' &&
23
- ( item . value . type === 'ArrowFunctionExpression' || item . value . type === 'FunctionExpression' ) &&
24
- ! item . value . expression // render: () => test
23
+ ( item . value . type === 'ArrowFunctionExpression' || item . value . type === 'FunctionExpression' )
25
24
)
26
25
if ( ! node ) return
27
26
28
27
forbiddenNodes . forEach ( el => {
29
28
if (
30
29
el . loc . start . line >= node . value . loc . start . line &&
31
30
el . loc . end . line <= node . value . loc . end . line &&
32
- node . value === el
31
+ el . loc . start . line === node . value . loc . start . line
33
32
) {
34
33
context . report ( {
35
34
node : node . key ,
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ function create (context) {
29
29
cp . value &&
30
30
el . loc . start . line >= cp . value . loc . start . line &&
31
31
el . loc . end . line <= cp . value . loc . end . line &&
32
- cp . value . parent === el
32
+ el . loc . start . line === cp . value . loc . start . line
33
33
) {
34
34
context . report ( {
35
35
node : el ,
Original file line number Diff line number Diff line change @@ -553,7 +553,7 @@ module.exports = {
553
553
funcInfo . hasReturnValue = Boolean ( node . argument )
554
554
} ,
555
555
'ArrowFunctionExpression:exit' ( node ) {
556
- if ( ! isValidReturn ( ) ) {
556
+ if ( ! isValidReturn ( ) && ! node . expression ) {
557
557
cb ( funcInfo . node )
558
558
}
559
559
} ,
You can’t perform that action at this time.
0 commit comments