eslint-plugin-angular
Advanced tools
Comparing version 2.4.1 to 2.4.2
{ | ||
"name": "eslint-plugin-angular", | ||
"version": "2.4.1", | ||
"version": "2.4.2", | ||
"description": "ESLint rules for AngularJS projects", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -19,3 +19,3 @@ /** | ||
MemberExpression: function(node) { | ||
if (node.object.type === 'Identifier' && node.object.name !== 'angular' && node.property.name === 'forEach') { | ||
if (node.object.name !== 'angular' && node.property.name === 'forEach') { | ||
context.report(node, 'You should use the angular.forEach method', {}); | ||
@@ -22,0 +22,0 @@ } |
@@ -13,3 +13,3 @@ /** | ||
var utils = require('./utils/utils'); | ||
const utils = require('./utils/utils'); | ||
@@ -23,5 +23,5 @@ module.exports = { | ||
create: function(context) { | ||
var angularObjectList = ['controller', 'filter', 'directive', 'service', 'factory', 'provider']; | ||
var services = ['$http', '$resource', 'Restangular']; | ||
var message = 'You should use the same service ({{method}}) for REST API calls'; | ||
let angularObjectList = ['controller', 'filter', 'directive', 'service', 'factory', 'provider']; | ||
let services = ['$http', '$resource', 'Restangular']; | ||
let message = 'You should use the same service ({{method}}) for REST API calls'; | ||
@@ -51,2 +51,6 @@ | ||
if (utils.isAngularComponent(node) && callee.type === 'MemberExpression' && angularObjectList.indexOf(callee.property.name) >= 0) { | ||
if (context.options[0] === node.arguments[0].value) { | ||
return; | ||
} | ||
if (utils.isFunctionType(node.arguments[1])) { | ||
@@ -53,0 +57,0 @@ checkAllElements(node.arguments[1].params); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
284250
4616