Socket
Socket
Sign inDemoInstall

eslint-plugin-requirejs

Package Overview
Dependencies
94
Maintainers
1
Versions
35
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.9.4 to 0.10.0

5

CHANGELOG.md

@@ -0,1 +1,6 @@

### v0.10.0 - July 11, 2016
* 0.10.0 (Casey Visco)
* Add array of allowed paths to allowExtraDependencies of amd-function-arity (fixes #77) (Sam Bason)
### v0.9.4 - February 1, 2016

@@ -2,0 +7,0 @@

31

lib/rules/amd-function-arity.js

@@ -37,2 +37,14 @@ /**

function allUnassignedPathsAreAllowed(dependencyNodes, callbackParams) {
if (typeof allowExtraDependencies === "boolean") {
return allowExtraDependencies;
}
var unassignedPaths = dependencyNodes.slice(callbackParams.length);
return unassignedPaths.every(function (path) {
return allowExtraDependencies.indexOf(path.value) !== -1;
});
}
function checkArity(node, funcName) {

@@ -52,3 +64,3 @@ var dependencyNodes = util.getDependencyNodes(node),

if (dependencyNodes.length < callbackParams.length) {
if (dependencyCount < actualParamCount) {
context.report(node, TOO_MANY_PARAMS_MESSAGE, {

@@ -59,3 +71,3 @@ functionName: funcName,

});
} else if (dependencyNodes.length > callbackParams.length && !allowExtraDependencies) {
} else if (dependencyCount > actualParamCount && !allUnassignedPathsAreAllowed(dependencyNodes, callbackParams)) {
context.report(node, TOO_FEW_PARAMS_MESSAGE, {

@@ -95,4 +107,15 @@ functionName: funcName,

"allowExtraDependencies": {
"type": "boolean",
"default": false
anyOf: [
{
"type": "boolean",
"default": false
},
{
"type": "array",
"uniqueItems": true,
"items": {
"type": "string"
}
}
]
}

@@ -99,0 +122,0 @@ },

2

package.json
{
"name": "eslint-plugin-requirejs",
"author": "Casey Visco <cvisco@gmail.com>",
"version": "0.9.4",
"version": "0.10.0",
"description": "Enforce code conventions for RequireJS modules with ESLint",

@@ -6,0 +6,0 @@ "homepage": "https://github.com/cvisco/eslint-plugin-requirejs",

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc