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 1.8.0 to 1.8.1

9

CHANGELOG.md

@@ -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

15

lib/rules/prefer-times.js

@@ -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",

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