Skip to content

Commit c2bc020

Browse files
committed
feat: cover ThisExpression
1 parent ccbee98 commit c2bc020

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/rules/no-use-computed-property-like-method.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ const getValueType = ({ property, propertyMap }) => {
103103
) {
104104
if (
105105
returnStatement.argument.type === 'MemberExpression' &&
106+
returnStatement.argument.object.type === 'ThisExpression' &&
106107
returnStatement.argument.property.type === 'Identifier'
107108
)
108109
return {
@@ -114,6 +115,7 @@ const getValueType = ({ property, propertyMap }) => {
114115
if (
115116
returnStatement.argument.type === 'CallExpression' &&
116117
returnStatement.argument.callee.type === 'MemberExpression' &&
118+
returnStatement.argument.callee.object.type === 'ThisExpression' &&
117119
returnStatement.argument.callee.property.type === 'Identifier'
118120
)
119121
return {

0 commit comments

Comments
 (0)