eslint-plugin-lodash
Advanced tools
Comparing version 1.8.2 to 1.8.3
@@ -11,4 +11,11 @@ # Change Log | ||
[unreleased]: https://github.com/wix/eslint-plugin-lodash/compare/v1.8.2...HEAD | ||
[unreleased]: https://github.com/wix/eslint-plugin-lodash/compare/v1.8.3...HEAD | ||
## [1.8.3] - 2016-05-01 | ||
### Fixed | ||
- Fixed case where `collection-return` reports false positive in nested arrow functions. ([`e59f507`][e59f507]) | ||
[e59f507]: https://github.com/wix/eslint-plugin-lodash/commit/e59f50754bf9fa9463d98db9f0861fefbd3d2144 | ||
[1.8.3]: https://github.com/wix/eslint-plugin-lodash/compare/v1.8.3...v1.8.2 | ||
## [1.8.2] - 2016-04-28 | ||
@@ -15,0 +22,0 @@ ### Fixed |
@@ -28,4 +28,4 @@ /** | ||
function addToCallStackIfCollectionMethod(node) { | ||
if (lodashUtil.isLodashCollectionMethod(node.parent, settings.version) && (lodashUtil.isLodashCall(node.parent, settings.pragma) || lodashUtil.isLodashWrapper(node.parent, settings.pragma, settings.version))) { | ||
callStack.push({ node: node.parent }); | ||
if (lodashUtil.isLodashCollectionMethod(node, settings.version) && (lodashUtil.isLodashCall(node, settings.pragma) || lodashUtil.isLodashWrapper(node, settings.pragma, settings.version))) { | ||
callStack.push({ node: node }); | ||
} | ||
@@ -36,3 +36,3 @@ } | ||
FunctionExpression: function FunctionExpression(node) { | ||
addToCallStackIfCollectionMethod(node); | ||
addToCallStackIfCollectionMethod(node.parent); | ||
callStack.push({ node: node, found: false }); | ||
@@ -43,4 +43,4 @@ }, | ||
ArrowFunctionExpression: function ArrowFunctionExpression(node) { | ||
addToCallStackIfCollectionMethod(node); | ||
if (node.body.type === 'BlockStatement') { | ||
addToCallStackIfCollectionMethod(node.parent); | ||
callStack.push({ node: node, found: false }); | ||
@@ -50,4 +50,3 @@ } | ||
'ArrowFunctionExpression:exit': function ArrowFunctionExpressionExit(node) { | ||
var last = _.last(callStack); | ||
if (last && last.node === node) { | ||
if (node.body.type === 'BlockStatement') { | ||
handleExitOfFunctionWithBlock(node); | ||
@@ -61,10 +60,4 @@ } | ||
} | ||
}, | ||
'CallExpression:exit': function CallExpressionExit(node) { | ||
var last = _.last(callStack); | ||
if (last && last.node === node) { | ||
callStack.pop(); | ||
} | ||
} | ||
}; | ||
}; |
{ | ||
"name": "eslint-plugin-lodash", | ||
"version": "1.8.2", | ||
"version": "1.8.3", | ||
"author": "Omer Ganim <ganimomer@gmail.com>", | ||
@@ -5,0 +5,0 @@ "description": "Lodash specific linting rules for ESLint", |
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
131432
2583