eslint-plugin-lodash
Advanced tools
Comparing version 1.8.0 to 1.8.1
@@ -11,4 +11,11 @@ # Change Log | ||
[unreleased]: https://github.com/wix/eslint-plugin-lodash/compare/v1.8.0...HEAD | ||
[unreleased]: https://github.com/wix/eslint-plugin-lodash/compare/v1.8.1...HEAD | ||
## [1.8.1] - 2016-04-27 | ||
### Fixed | ||
- Fixed case where `prefer-times` falsely reports when parameter usage is nested. ([`ae8b626`][ae8b626]) | ||
[ae8b626]: https://github.com/wix/eslint-plugin-lodash/commit/ae8b626cf59de5ddd52785a8822c83fbc6381a2e | ||
[1.8.1]: https://github.com/wix/eslint-plugin-lodash/compare/v1.8.1...v1.8.0 | ||
## [1.8.0] - 2016-04-24 | ||
@@ -15,0 +22,0 @@ ### Added |
@@ -46,2 +46,6 @@ /** | ||
var isIterateeParamDefinition = function isIterateeParamDefinition(state, node) { | ||
return state && node.parent === state.func && _.includes(state.func.params, node) || node.parent.type === 'AssignmentPattern' && node.parent.parent === state.func; | ||
}; | ||
return { | ||
@@ -51,8 +55,7 @@ FunctionExpression: handleFunctionExpression, | ||
Identifier: function Identifier(node) { | ||
var state = _.last(callStack); | ||
if (state) { | ||
var isIterateeParamDefinition = node.parent === state.func && _.includes(node.parent.params, node) || node.parent.type === 'AssignmentPattern' && node.parent.parent === state.func; | ||
if (!isIterateeParamDefinition && _.includes(state.params, node.name)) { | ||
state.anyUsed = true; | ||
} | ||
if (!isIterateeParamDefinition(_.last(callStack), node)) { | ||
var usageContext = _.findLast(callStack, function (state) { | ||
return _.includes(state.params, node.name); | ||
}); | ||
_.set(usageContext, 'anyUsed', true); | ||
} | ||
@@ -59,0 +62,0 @@ }, |
{ | ||
"name": "eslint-plugin-lodash", | ||
"version": "1.8.0", | ||
"version": "1.8.1", | ||
"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
131076
2590