eslint-plugin-lodash
Advanced tools
Comparing version 2.1.5 to 2.1.6
@@ -11,4 +11,11 @@ # Change Log | ||
[unreleased]: https://github.com/wix/eslint-plugin-lodash/compare/v2.1.5...HEAD | ||
[unreleased]: https://github.com/wix/eslint-plugin-lodash/compare/v2.1.6...HEAD | ||
## [2.1.6] - 2016-10-22 | ||
### Fixed | ||
- Fixed `callback-binding` warning on methods with `fromIndex` in v4. ([`1d6a958`][1d6a958]) | ||
[1d6a958]: https://github.com/wix/eslint-plugin-lodash/commit/1d6a958b7715e4b895394497c3b36ea12bc76fc5 | ||
[2.1.6]: https://github.com/wix/eslint-plugin-lodash/compare/v2.1.6...v2.1.5 | ||
## [2.1.5] - 2016-10-22 | ||
@@ -15,0 +22,0 @@ ### Fixed |
@@ -27,3 +27,3 @@ /** | ||
var transformerMethods = ['reduce', 'reduceRight', 'transform']; | ||
var methodsWithExtraArg = ['reduce', 'reduceRight', 'transform', 'find', 'findLast', 'findIndex', 'findLastIndex']; | ||
var includes = require('lodash/includes'); | ||
@@ -44,5 +44,5 @@ | ||
var isTransformerMethod = includes(transformerMethods, method); | ||
var hasExtraArg = includes(methodsWithExtraArg, method); | ||
var iterateeIndex = node.arguments.indexOf(iteratee); | ||
if (iterateeIndex !== -1 && (isTransformerMethod && node.arguments[iterateeIndex + 2] || !isTransformerMethod && node.arguments[iterateeIndex + 1])) { | ||
if (iterateeIndex !== -1 && (hasExtraArg && node.arguments[iterateeIndex + 2] || !hasExtraArg && node.arguments[iterateeIndex + 1])) { | ||
context.report(iteratee, 'Do not use Lodash 3 thisArg, use binding instead'); | ||
@@ -49,0 +49,0 @@ } |
{ | ||
"name": "eslint-plugin-lodash", | ||
"version": "2.1.5", | ||
"version": "2.1.6", | ||
"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
167723