Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

eslint-plugin-lodash

Package Overview
Dependencies
Maintainers
3
Versions
100
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-lodash - npm Package Compare versions

Comparing version 2.4.0 to 2.4.1

11

CHANGELOG.md

@@ -11,5 +11,12 @@ # Change Log

[unreleased]: https://github.com/wix/eslint-plugin-lodash/compare/v2.4.0...HEAD
[unreleased]: https://github.com/wix/eslint-plugin-lodash/compare/v2.4.1...HEAD
## [2.3.7] - 2017-03-27
## [2.4.1] - 2017-04-26
### Fixed
- Reimpleneted rule `callback-binding` to use method data ([`97375de`][97375de])
[97375de]: https://github.com/wix/eslint-plugin-lodash/commit/97375defe7a299e6262618ffb0a6cc80c0bcac6e
[2.4.1]: https://github.com/wix/eslint-plugin-lodash/compare/v2.4.1...v2.4.0
## [2.4.0] - 2017-03-27
### Added

@@ -16,0 +23,0 @@ - Added rule `prefer-some` ([`842f02d`][842f02d])

16

lib/rules/callback-binding.js

@@ -18,9 +18,11 @@ /**

var _require2 = require('../util/astUtil'),
getMethodName = _require2.getMethodName;
var _require2 = require('../util/methodDataUtil'),
getFunctionMaxArity = _require2.getFunctionMaxArity;
var _require3 = require('../util/astUtil'),
getMethodName = _require3.getMethodName;
var _require$getSettings = require('../util/settingsUtil').getSettings(context),
version = _require$getSettings.version;
var methodsWithExtraArg = ['reduce', 'reduceRight', 'transform', 'find', 'findLast', 'findIndex', 'findLastIndex'];
var includes = require('lodash/includes');

@@ -39,7 +41,7 @@

4: function _(node, iteratee, _ref) {
var method = _ref.method;
var method = _ref.method,
callType = _ref.callType;
var hasExtraArg = includes(methodsWithExtraArg, method);
var iterateeIndex = node.arguments.indexOf(iteratee);
if (iterateeIndex !== -1 && (hasExtraArg && node.arguments[iterateeIndex + 2] || !hasExtraArg && node.arguments[iterateeIndex + 1])) {
var argsLength = node.arguments.length + (callType === 'chained' ? 1 : 0);
if (iteratee && argsLength > getFunctionMaxArity(4, method)) {
context.report(iteratee, 'Do not use Lodash 3 thisArg, use binding instead');

@@ -46,0 +48,0 @@ }

@@ -1799,3 +1799,2 @@ 'use strict';

iteratee: false,
iterateeIndex: 2,
args: 2

@@ -1826,3 +1825,2 @@ },

iteratee: false,
iterateeIndex: 2,
args: 2

@@ -1829,0 +1827,0 @@ },

{
"name": "eslint-plugin-lodash",
"version": "2.4.0",
"version": "2.4.1",
"author": "Omer Ganim <ganimomer@gmail.com>",

@@ -33,14 +33,14 @@ "description": "Lodash specific linting rules for ESLint",

"devDependencies": {
"babel-cli": "6.16.0",
"babel-plugin-istanbul": "2.0.3",
"babel-preset-es2015": "6.16.0",
"babel-register": "6.16.3",
"coveralls": "^2.11.11",
"cross-env": "3.1.3",
"eslint": "3.7.1",
"babel-cli": "6.24.1",
"babel-plugin-istanbul": "4.1.1",
"babel-preset-es2015": "6.24.1",
"babel-register": "6.24.1",
"coveralls": "2.13.0",
"cross-env": "4.0.0",
"eslint": "3.19.0",
"eslint-config-wix-editor": "0.2.3",
"eslint-traverser": "1.5.2",
"istanbul": "^0.4.4",
"mocha": "3.1.0",
"nyc": "8.3.1"
"mocha": "3.3.0",
"nyc": "10.2.0"
},

@@ -47,0 +47,0 @@ "engines": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc