Skip to content

Commit

Permalink
minor rule fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
tsigle committed Dec 5, 2024
1 parent f4bd701 commit fde1282
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 11 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 3 additions & 9 deletions rules/dv-rule-node-001/NodeRule.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,7 @@ class NodeRule extends LintRule {
if (
data.nodeType === "CONNECTION" &&
!data.properties?.nodeTitle?.value &&
!(
(data.name === "Teleport" || data.name === "Node") &&
data.capabilityName === "goToNode"
)
!(data.capabilityName === 'goToNode' || data.capabilityName === 'returnBackToCallingNode')
) {
this.addError("dv-bp-node-001", {
flowId: flow.flowId,
Expand All @@ -67,10 +64,7 @@ class NodeRule extends LintRule {
if (
data.nodeType === "CONNECTION" &&
!data.properties?.nodeDescription?.value &&
!(
(data.name === "Teleport" || data.name === "Node") &&
data.capabilityName === "goToNode"
)
!(data.capabilityName === 'goToNode' || data.capabilityName === 'returnBackToCallingNode')
) {
this.addError("dv-bp-node-003", {
flowId: flow.flowId,
Expand All @@ -95,7 +89,7 @@ class NodeRule extends LintRule {
this.addError("dv-bp-node-002", {
flowId: flow.flowId,
messageArgs: [
data.properties?.backgroundColor?.value.toLowerCase(),
data.properties?.backgroundColor?.value.toLowerCase() || '',
`${data.name} (${data.id}) - ${data.capabilityName}`,
],
recommendationArgs: [`${data.name} (${data.id}) - ${data.capabilityName}`, backgroundColor[connectorCapability]],
Expand Down
1 change: 1 addition & 0 deletions rules/dv-rule-subflow-001/SubflowRule.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ class DVRule extends LintRule {
if (missingFields?.length > 0) {
const selectedSubflowName = node.data.properties.subFlowId.value.label;
this.addError("dv-er-subflow-003", {
flowId: targetFlow.flowId,
messageArgs: [selectedSubflowName],
recommendationArgs: [selectedSubflowName],
nodeId: node.data.id,
Expand Down

0 comments on commit fde1282

Please sign in to comment.