eslint-plugin-lodash
Advanced tools
Comparing version 5.1.0 to 5.1.1
# Prefer thru | ||
When starting a chain with an initial value that contains a function call on a single argument, , it could improve readability to move that function to the chain itself with `thru`. | ||
When starting a chain with an initial value that contains a function call on a single argument, it could improve readability to move that function to the chain itself with `thru`. | ||
@@ -5,0 +5,0 @@ ## Rule Details |
@@ -7,3 +7,3 @@ # Preferred Alias | ||
This rule takes one argument - an optional options object. This object can have this object can have one key: | ||
This rule takes one argument - an optional options object. This object can have one key: | ||
- `ignoreMethods`: contains an array of method names that should not be reported on. | ||
@@ -10,0 +10,0 @@ |
{ | ||
"name": "eslint-plugin-lodash", | ||
"version": "5.1.0", | ||
"version": "5.1.1", | ||
"author": "Omer Ganim <ganimomer@gmail.com>", | ||
@@ -11,3 +11,6 @@ "description": "Lodash specific linting rules for ESLint", | ||
"test": "npm run lint && npm run unit-test", | ||
"unit-test": "cross-env NODE_ENV=test nyc mocha tests/**/*.js --reporter=dot" | ||
"unit-test": "cross-env NODE_ENV=test nyc mocha tests/**/*.js --reporter=dot", | ||
"patch": "npm version patch -m\"update version to %s\" && git push && git push --tags", | ||
"minor": "npm version minor -m\"update version to %s\" && git push && git push --tags", | ||
"major": "npm version major -m\"update version to %s\" && git push && git push --tags" | ||
}, | ||
@@ -30,17 +33,18 @@ "files": [ | ||
"dependencies": { | ||
"lodash": "4.17.11" | ||
"lodash": "^4.17.15" | ||
}, | ||
"devDependencies": { | ||
"babel-plugin-istanbul": "5.1.0", | ||
"babel-preset-es2015": "6.24.1", | ||
"babel-register": "6.26.0", | ||
"coveralls": "3.0.2", | ||
"cross-env": "5.2.0", | ||
"eslint": "5.9.0", | ||
"eslint-config-wix-editor": "7.0.0", | ||
"eslint-plugin-eslint-plugin": "1.4.1", | ||
"eslint-traverser": "1.5.2", | ||
"istanbul": "^0.4.4", | ||
"mocha": "5.2.0", | ||
"nyc": "13.1.0" | ||
"@babel/core": "^7.5.5", | ||
"@babel/preset-env": "^7.5.5", | ||
"@babel/register": "^7.5.5", | ||
"babel-plugin-istanbul": "^5.2.0", | ||
"coveralls": "^3.0.6", | ||
"cross-env": "^5.2.0", | ||
"eslint": "^6.1.0", | ||
"eslint-config-wix-editor": "^7.1.0", | ||
"eslint-plugin-eslint-plugin": "^2.1.0", | ||
"eslint-traverser": "^1.5.2", | ||
"istanbul": "^0.4.5", | ||
"mocha": "^6.2.0", | ||
"nyc": "^14.1.1" | ||
}, | ||
@@ -47,0 +51,0 @@ "engines": { |
@@ -70,2 +70,8 @@ /** | ||
function reportOnSingleChain(node) { | ||
if (isMethodCall(node) && (isEndOfChain(node) || isBeforeChainBreaker(node))) { | ||
context.report({node, messageId: 'single'}) | ||
} | ||
} | ||
const callExpressionVisitors = { | ||
@@ -76,6 +82,3 @@ always: node => { | ||
} else if (lodashContext.isLodashChainStart(node)) { | ||
const firstCall = node.parent.parent | ||
if (isMethodCall(firstCall) && (isEndOfChain(firstCall) || isBeforeChainBreaker(firstCall))) { | ||
context.report({node: firstCall, messageId: 'single'}) | ||
} | ||
reportOnSingleChain(node.parent.parent) | ||
} | ||
@@ -92,6 +95,3 @@ }, | ||
} else if (lodashContext.isLodashChainStart(node)) { | ||
const firstCall = node.parent.parent | ||
if (isMethodCall(firstCall) && (isEndOfChain(firstCall) || isBeforeChainBreaker(firstCall))) { | ||
context.report({node: firstCall, messageId: 'single'}) | ||
} | ||
reportOnSingleChain(node.parent.parent) | ||
} | ||
@@ -98,0 +98,0 @@ } |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
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
299822
13
7182
1
+ Addedlodash@4.17.21(transitive)
- Removedlodash@4.17.11(transitive)
Updatedlodash@^4.17.15