New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

eslint-plugin-loopback-options

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-loopback-options - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

23

lib/rules/options-required.js

@@ -26,17 +26,2 @@ /**

// variables should be defined here
function validateExp(exp, node) {
if (!(exp && exp.callee && exp.callee.property)) {
return;
}
if (exp.callee.property.name === 'save' && exp.arguments.length === 0) {
context.report(node, 'Options should be passed to save() function');
}
if (
exp.callee.property.name === 'create' &&
exp.arguments[exp.arguments.length - 1].name !== 'options'
) {
context.report(node, "'options' should be the last argument passed to create() function");
}
}
//----------------------------------------------------------------------

@@ -58,3 +43,3 @@ // Public

node.arguments[node.arguments.length - 1].type === 'Identifier' &&
node.arguments[node.arguments.length - 1].name !== 'options'
['options', 'ctxOptions'].indexOf(node.arguments[node.arguments.length - 1].name) === -1
) {

@@ -73,3 +58,5 @@ context.report(

node.arguments[node.arguments.length - 2].type === 'Identifier' &&
node.arguments[node.arguments.length - 2].name !== 'options'
['options', 'ctxOptions'].indexOf(
node.arguments[node.arguments.length - 2].name,
) === -1
) {

@@ -88,1 +75,3 @@ context.report(

};
// eslint-disable-next-line loopback-options/options-required
{
"name": "eslint-plugin-loopback-options",
"version": "1.1.0",
"version": "1.1.1",
"description": "Checks if options argument is passed to write functions",

@@ -5,0 +5,0 @@ "keywords": [

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