eslint-plugin-pipedream
Advanced tools
Comparing version 0.2.0 to 0.2.1
20
index.js
@@ -222,3 +222,21 @@ function isModuleExports(node) { | ||
function componentVersionTsMacroCheck(context, node) { | ||
const versionProp = checkComponentIsSourceAndReturnTargetProp(node, "version"); | ||
let component; | ||
if (isDefaultExport(node)) { | ||
component = node?.body[0]?.declaration; | ||
} | ||
if (node.expression) { | ||
const { | ||
left, | ||
right, | ||
} = node.expression; | ||
if (isModuleExports(left) && isObjectWithProperties(right)) { | ||
component = right; | ||
} | ||
} | ||
if (!component) return; | ||
const { properties } = component; | ||
const versionProp = findPropertyWithName("version", properties); | ||
if (!versionProp) return; | ||
@@ -225,0 +243,0 @@ if (versionProp?.value?.value.includes("{{ts}}")) { |
{ | ||
"name": "eslint-plugin-pipedream", | ||
"version": "0.2.0", | ||
"version": "0.2.1", | ||
"description": "ESLint plugin for Pipedream components: https://pipedream.com/docs/components/api/", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -102,5 +102,5 @@ module.exports = { | ||
description: "foo", | ||
type: "source", | ||
type: "action", | ||
version: "0.0.{{ts}}", | ||
}, | ||
}; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
134072
796