diff --git a/lib/rules/no-assigning-return-values.js b/lib/rules/no-assigning-return-values.js index a217aaea..08294bfa 100644 --- a/lib/rules/no-assigning-return-values.js +++ b/lib/rules/no-assigning-return-values.js @@ -57,8 +57,7 @@ function isCypressCommandDeclaration (declarator) { if (!object) return } - - const commandName = get(object, 'parent.property.name') + const commandName = get(declarator, 'init.callee.property.name') if (commandName && whitelistedCommands[commandName]) return