Socket
Socket
Sign inDemoInstall

eslint-plugin-angular

Package Overview
Dependencies
Maintainers
1
Versions
74
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-angular - npm Package Compare versions

Comparing version 2.4.1 to 2.4.2

2

package.json
{
"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);

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc