CallExpression: function()

in rules/on-watch.js [73:82]


            CallExpression: function(node) {
                if (isScopeOnOrWatch(node, ['$rootScope']) && !isFirstArgDestroy(node)) {
                    if (node.parent.type !== 'VariableDeclarator' &&
                        node.parent.type !== 'AssignmentExpression' &&
                        !(isScopeOnOrWatch(node.parent, ['$rootScope', '$scope', 'scope']) &&
                            isFirstArgDestroy(node.parent))) {
                        report(node, node.callee.property.name);
                    }
                }
            }