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 5.1.0 to 5.1.1

2

docs/rules/prefer-thru.md
# Prefer thru
When starting a chain with an initial value that contains a function call on a single argument, , it could improve readability to move that function to the chain itself with `thru`.
When starting a chain with an initial value that contains a function call on a single argument, it could improve readability to move that function to the chain itself with `thru`.

@@ -5,0 +5,0 @@ ## Rule Details

@@ -7,3 +7,3 @@ # Preferred Alias

This rule takes one argument - an optional options object. This object can have this object can have one key:
This rule takes one argument - an optional options object. This object can have one key:
- `ignoreMethods`: contains an array of method names that should not be reported on.

@@ -10,0 +10,0 @@

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

@@ -11,3 +11,6 @@ "description": "Lodash specific linting rules for ESLint",

"test": "npm run lint && npm run unit-test",
"unit-test": "cross-env NODE_ENV=test nyc mocha tests/**/*.js --reporter=dot"
"unit-test": "cross-env NODE_ENV=test nyc mocha tests/**/*.js --reporter=dot",
"patch": "npm version patch -m\"update version to %s\" && git push && git push --tags",
"minor": "npm version minor -m\"update version to %s\" && git push && git push --tags",
"major": "npm version major -m\"update version to %s\" && git push && git push --tags"
},

@@ -30,17 +33,18 @@ "files": [

"dependencies": {
"lodash": "4.17.11"
"lodash": "^4.17.15"
},
"devDependencies": {
"babel-plugin-istanbul": "5.1.0",
"babel-preset-es2015": "6.24.1",
"babel-register": "6.26.0",
"coveralls": "3.0.2",
"cross-env": "5.2.0",
"eslint": "5.9.0",
"eslint-config-wix-editor": "7.0.0",
"eslint-plugin-eslint-plugin": "1.4.1",
"eslint-traverser": "1.5.2",
"istanbul": "^0.4.4",
"mocha": "5.2.0",
"nyc": "13.1.0"
"@babel/core": "^7.5.5",
"@babel/preset-env": "^7.5.5",
"@babel/register": "^7.5.5",
"babel-plugin-istanbul": "^5.2.0",
"coveralls": "^3.0.6",
"cross-env": "^5.2.0",
"eslint": "^6.1.0",
"eslint-config-wix-editor": "^7.1.0",
"eslint-plugin-eslint-plugin": "^2.1.0",
"eslint-traverser": "^1.5.2",
"istanbul": "^0.4.5",
"mocha": "^6.2.0",
"nyc": "^14.1.1"
},

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

@@ -70,2 +70,8 @@ /**

function reportOnSingleChain(node) {
if (isMethodCall(node) && (isEndOfChain(node) || isBeforeChainBreaker(node))) {
context.report({node, messageId: 'single'})
}
}
const callExpressionVisitors = {

@@ -76,6 +82,3 @@ always: node => {

} else if (lodashContext.isLodashChainStart(node)) {
const firstCall = node.parent.parent
if (isMethodCall(firstCall) && (isEndOfChain(firstCall) || isBeforeChainBreaker(firstCall))) {
context.report({node: firstCall, messageId: 'single'})
}
reportOnSingleChain(node.parent.parent)
}

@@ -92,6 +95,3 @@ },

} else if (lodashContext.isLodashChainStart(node)) {
const firstCall = node.parent.parent
if (isMethodCall(firstCall) && (isEndOfChain(firstCall) || isBeforeChainBreaker(firstCall))) {
context.report({node: firstCall, messageId: 'single'})
}
reportOnSingleChain(node.parent.parent)
}

@@ -98,0 +98,0 @@ }

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