CallExpression: function()

in rules/no-services.js [79:99]


            CallExpression: function(node) {
                let callee = node.callee;

                if (utils.isAngularComponent(node) && callee.type === 'MemberExpression' && angularObjectList.indexOf(callee.property.name) >= 0) {
                    if (utils.isFunctionType(node.arguments[1])) {
                        node.arguments[1].params.forEach(function(service) {
                            if (service.type === 'Identifier' && isSetBedService(service.name, callee.property.name)) {
                                context.report(node, message + ' (' + service.name + ' in ' + callee.property.name + ')', {});
                            }
                        });
                    }

                    if (utils.isArrayType(node.arguments[1])) {
                        node.arguments[1].elements.forEach(function(service) {
                            if (service.type === 'Literal' && isSetBedService(service.value, callee.property.name)) {
                                context.report(node, message + ' (' + service.value + ' in ' + callee.property.name + ')', {});
                            }
                        });
                    }
                }
            }