Socket
Socket
Sign inDemoInstall

eslint-plugin-you-dont-need-lodash-underscore

Package Overview
Dependencies
Maintainers
3
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-you-dont-need-lodash-underscore - npm Package Compare versions

Comparing version 6.7.1 to 6.7.2

.npmignore

2

lib/rules/all.js

@@ -28,3 +28,3 @@ 'use strict';

const callee = node.callee;
const objectName = callee.name || (callee.object && callee.object.name) || (callee.object.callee && callee.object.callee.name);
const objectName = callee.name || (callee.object && callee.object.name) || (callee.object && callee.object.callee && callee.object.callee.name);

@@ -31,0 +31,0 @@ if (objectName === 'require' && node.arguments.length === 1) {

{
"name": "eslint-plugin-you-dont-need-lodash-underscore",
"version": "6.7.1",
"version": "6.7.2",
"description": "Check methods you can use natively without lodash/underscore",

@@ -5,0 +5,0 @@ "repository": {

@@ -113,1 +113,31 @@ 'use strict';

});
ruleTester.run('_.isUndefined', rules['is-undefined'], {
valid: [
'2 === undefined'
],
invalid: [{
code: '_.isUndefined(2)',
errors: ['Consider using the native value === undefined']
},{
code: '_(2).isUndefined()',
errors: ['Consider using the native value === undefined']
}]
});
/*This is to make sure that You-Dont-Need-Lodash can handle the
evaluation of nested functions that had caused an error noted in the comments of
Pull Request #219*/
ruleTester.run('Nested functions', rules['is-undefined'], {
valid: [
`function myNestedFunction(firstInput) {
return (secondInput) => {
return firstInput + secondInput
}
}
myNestedFunction(2)(2)`
],
invalid: []
});

Sorry, the diff of this file is too big to display

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