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

eslint-plugin-pipedream

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-pipedream - npm Package Compare versions

Comparing version 0.2.2 to 0.2.3

.github/workflows/pull-request-checks.yaml

92

index.js

@@ -23,2 +23,20 @@ function isModuleExports(node) {

function getComponentFromNode(node) {
if (isDefaultExport(node) && isObjectWithProperties(node.declaration)) {
return node.declaration;
}
if (node.expression) {
const {
left,
right,
} = node.expression;
if (isModuleExports(left) && isObjectWithProperties(right)) {
return right;
}
}
return null;
}
// Objects can contain key names surrounded by quotes, or not

@@ -48,17 +66,4 @@ // propertyArray is the array of Property nodes in the component object

function componentContainsPropertyCheck(context, node, propertyName, message) {
let component;
if (isDefaultExport(node)) {
component = node.declaration;
}
const component = getComponentFromNode(node);
if (node.expression) {
const {
left,
right,
} = node.expression;
if (isModuleExports(left) && isObjectWithProperties(right)) {
component = right;
}
}
if (!component) return;

@@ -85,15 +90,3 @@ if (!astIncludesProperty(propertyName, component.properties)) {

function componentPropsContainsPropertyCheck(context, node, propertyName) {
let component;
if (isDefaultExport(node)) {
component = node.declaration;
}
if (node.expression) {
const {
left,
right,
} = node.expression;
if (isModuleExports(left) && isObjectWithProperties(right)) {
component = right;
}
}
const component = getComponentFromNode(node);

@@ -125,17 +118,4 @@ if (!component) return;

function optionalComponentPropsHaveDefaultProperty(context, node) {
let component;
if (isDefaultExport(node)) {
component = node.declaration;
}
const component = getComponentFromNode(node);
if (node.expression) {
const {
left,
right,
} = node.expression;
if (isModuleExports(left) && isObjectWithProperties(right)) {
component = right;
}
}
if (!component) return;

@@ -173,17 +153,4 @@ const { properties } = component;

function checkComponentIsSourceAndReturnTargetProp(node, propertyName) {
let component;
if (isDefaultExport(node)) {
component = node.declaration;
}
const component = getComponentFromNode(node);
if (node.expression) {
const {
left,
right,
} = node.expression;
if (isModuleExports(left) && isObjectWithProperties(right)) {
component = right;
}
}
if (!component) return;

@@ -223,17 +190,4 @@ const { properties } = component;

function componentVersionTsMacroCheck(context, node) {
let component;
if (isDefaultExport(node)) {
component = node.declaration;
}
const component = getComponentFromNode(node);
if (node.expression) {
const {
left,
right,
} = node.expression;
if (isModuleExports(left) && isObjectWithProperties(right)) {
component = right;
}
}
if (!component) return;

@@ -240,0 +194,0 @@ const { properties } = component;

{
"name": "eslint-plugin-pipedream",
"version": "0.2.2",
"version": "0.2.3",
"description": "ESLint plugin for Pipedream components: https://pipedream.com/docs/components/api/",

@@ -5,0 +5,0 @@ "main": "index.js",

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