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 1.4.0 to 1.4.1

2

package.json
{
"name": "eslint-plugin-angular",
"version": "1.4.0",
"version": "1.4.1",
"description": "ESLint rules for AngularJS projects",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -46,2 +46,9 @@ /**

}
var invalidArray = fn.params.filter(function(e, i) {
return e.name !== fn.parent.elements[i].value;
});
if (invalidArray.length > 0) {
context.report(fn, 'You have an error in your DI configuration. Each items of the array should match exactly one function parameter', {});
return;
}
} else {

@@ -62,7 +69,5 @@ if (fn.params.length === 0) {

if (syntax === '$inject') {
if (!fn.params || fn.params.length === 0) {
return;
}
if (fn && fn.id && utils.isIdentifierType(fn.id)) {
var $injectArray = $injectProperties[fn.id.name];
if ($injectArray && utils.isArrayType($injectArray)) {

@@ -73,6 +78,13 @@ if ($injectArray.elements.length !== fn.params.length) {

}
var invalidInjectArray = fn.params.filter(function(e, i) {
return e.name !== $injectArray.elements[i].value;
});
if (invalidInjectArray.length > 0) {
context.report(fn, 'You have an error in your DI configuration. Each items of the array should match exactly one function parameter', {});
return;
}
} else {
report(fn);
}
} else {
} else if (fn.params && fn.params.length !== 0) {
report(fn);

@@ -79,0 +91,0 @@ }

@@ -31,3 +31,4 @@ /**

function checkType(arg) {
return (configType === 'named' && (utils.isIdentifierType(arg) || utils.isNamedInlineFunction(arg))) ||
return utils.isCallExpression(arg) ||
(configType === 'named' && (utils.isIdentifierType(arg) || utils.isNamedInlineFunction(arg))) ||
(configType === 'anonymous' && utils.isFunctionType(arg) && !utils.isNamedInlineFunction(arg));

@@ -34,0 +35,0 @@ }

@@ -39,2 +39,3 @@ 'use strict';

isLiteralType: isLiteralType,
isCallExpression: isCallExpression,
isEmptyFunction: isEmptyFunction,

@@ -41,0 +42,0 @@ isStringRegexp: isStringRegexp,

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