eslint-plugin-lodash
Advanced tools
Comparing version 1.6.0 to 1.6.1
@@ -11,5 +11,12 @@ # Change Log | ||
[unreleased]: https://github.com/wix/eslint-plugin-lodash/compare/v1.6.0...HEAD | ||
[unreleased]: https://github.com/wix/eslint-plugin-lodash/compare/v1.6.1...HEAD | ||
## [1.6.0] - 2016-04-03 | ||
### Fixed | ||
- Stopped rule `collection-method-value` from reporting on mutating method `remove`. ([`05bff20`][05bff20]) | ||
[05bff20]: https://github.com/wix/eslint-plugin-lodash/commit/05bff20eb09187c7959470c99bd8c5405a255847 | ||
[1.6.1]: https://github.com/wix/eslint-plugin-lodash/compare/v1.6.1...v1.6.0 | ||
## [1.6.0] - 2016-04-03 | ||
### Added | ||
@@ -16,0 +23,0 @@ - Added rule [`collection-method-value`][collection-method-value]. ([`bc73ec8`][bc73ec8]) |
@@ -20,4 +20,8 @@ /** | ||
function isPureLodashCollectionMethod(node) { | ||
return lodashUtil.isLodashCollectionMethod(node, settings.version) && !lodashUtil.isCallToMethod(node, settings.version, 'remove'); | ||
} | ||
function reportIfMisused(node, isChain) { | ||
if (lodashUtil.isLodashCollectionMethod(node, settings.version) && !parentUsesValue(node, isChain)) { | ||
if (isPureLodashCollectionMethod(node) && !parentUsesValue(node, isChain)) { | ||
context.report(node, 'Use value returned from _.' + astUtil.getMethodName(node)); | ||
@@ -24,0 +28,0 @@ } else if (lodashUtil.isSideEffectIterationMethod(node, settings.version) && parentUsesValue(node, isChain)) { |
@@ -216,3 +216,3 @@ 'use strict'; | ||
}, | ||
shorthand: ['differenceBy', 'dropRightWhile', 'dropWhile', 'every', 'filter', 'find', 'findIndex', 'findKey', 'findLastKey', 'findLastIndex', 'groupBy', 'intersectionBy', 'map', 'mapValues', 'maxBy', 'minBy', 'partition', 'reject', 'some', 'sortedIndexBy', 'sortedLastIndexBy', 'sumBy', 'takeRightWhile', 'takeWhile', 'unionBy', 'uniqBy', 'xorBy'], | ||
shorthand: ['differenceBy', 'dropRightWhile', 'dropWhile', 'remove', 'every', 'filter', 'find', 'findIndex', 'findKey', 'findLastKey', 'findLastIndex', 'groupBy', 'intersectionBy', 'map', 'mapValues', 'maxBy', 'minBy', 'partition', 'reject', 'some', 'sortedIndexBy', 'sortedLastIndexBy', 'sumBy', 'takeRightWhile', 'takeWhile', 'unionBy', 'uniqBy', 'xorBy'], | ||
chainable: ['after', 'ary', 'assign', 'assignIn', 'assignInWith', 'assignWith', 'at', 'before', 'bind', 'bindAll', 'bindKey', 'chain', 'chunk', 'commit', 'compact', 'concat', 'conforms', 'constant', 'countBy', 'create', 'curry', 'debounce', 'defaults', 'defaultsDeep', 'defer', 'delay', 'difference', 'differenceBy', 'differenceWith', 'drop', 'dropRight', 'dropRightWhile', 'dropWhile', 'fill', 'filter', 'flatMap', 'flatten', 'flattenDeep', 'flattenDepth', 'flip', 'flow', 'flowRight', 'fromPairs', 'functions', 'functionsIn', 'groupBy', 'initial', 'intersection', 'intersectionBy', 'intersectionWith', 'invert', 'invertBy', 'invokeMap', 'iteratee', 'keyBy', 'keys', 'keysIn', 'map', 'mapKeys', 'mapValues', 'matches', 'matchesProperty', 'memoize', 'merge', 'mergeWith', 'method', 'methodOf', 'mixin', 'negate', 'nthArg', 'omit', 'omitBy', 'once', 'orderBy', 'over', 'overArgs', 'overEvery', 'overSome', 'partial', 'partialRight', 'partition', 'pick', 'pickBy', 'plant', 'property', 'propertyOf', 'pull', 'pullAll', 'pullAllBy', 'pullAllWith', 'pullAt', 'push', 'range', 'rangeRight', 'rearg', 'reject', 'remove', 'rest', 'reverse', 'sampleSize', 'set', 'setWith', 'shuffle', 'slice', 'sort', 'sortBy', 'splice', 'spread', 'tail', 'take', 'takeRight', 'takeRightWhile', 'takeWhile', 'tap', 'throttle', 'thru', 'toArray', 'toPairs', 'toPairsIn', 'toPath', 'toPlainObject', 'transform', 'unary', 'union', 'unionBy', 'unionWith', 'uniq', 'uniqBy', 'uniqWith', 'unset', 'unshift', 'unzip', 'unzipWith', 'update', 'updateWith', 'values', 'valuesIn', 'without', 'wrap', 'xor', 'xorBy', 'xorWith', 'zip', 'zipObject', 'zipObjectDeep', 'zipWith'], | ||
@@ -219,0 +219,0 @@ iteratee: { |
{ | ||
"name": "eslint-plugin-lodash", | ||
"version": "1.6.0", | ||
"version": "1.6.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
124954
2540