From 1b71239664c79f2e358e93c07dc9d107e7fcbd3b Mon Sep 17 00:00:00 2001 From: Manish Singh Date: Mon, 18 Nov 2024 18:47:06 +0530 Subject: [PATCH] Recommendation message for node color change --- docs/rules.json | 2 +- rules/dv-rule-node-001/NodeRule.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/rules.json b/docs/rules.json index 7026296..34224e6 100644 --- a/docs/rules.json +++ b/docs/rules.json @@ -150,7 +150,7 @@ "description": "All success/error JSON nodes should proper colors", "message": "Incorrect node color [%] - %", "type": "best-practice", - "recommendation": "The [%] - % is not using the correct color. To ensure consistency, use the recommended color: [%].", + "recommendation": "The <%> is not using the correct color. To ensure consistency, use the recommended color: [%].", "code": "dv-bp-node-002" }, "dv-bp-node-003": { diff --git a/rules/dv-rule-node-001/NodeRule.js b/rules/dv-rule-node-001/NodeRule.js index 22d1bb6..a3ddd9f 100644 --- a/rules/dv-rule-node-001/NodeRule.js +++ b/rules/dv-rule-node-001/NodeRule.js @@ -24,7 +24,7 @@ class NodeRule extends LintRule { description: "All success/error JSON nodes should proper colors", message: "Incorrect node color [%] - %", type: "best-practice", - recommendation: "The [%] - % is not using the correct color. To ensure consistency, use the recommended color: [%].", + recommendation: "The <%> is not using the correct color. To ensure consistency, use the recommended color: [%].", }); this.addCode("dv-bp-node-003", { description: "All nodes should have a description", @@ -95,7 +95,7 @@ class NodeRule extends LintRule { data.properties?.backgroundColor?.value.toLowerCase(), `${data.name} (${data.id}) - ${data.capabilityName}`, ], - recommendationArgs: [backgroundColor[connectorCapability], `${data.name} (${data.id}) - ${data.capabilityName}`], + recommendationArgs: [`${data.name} (${data.id}) - ${data.capabilityName}`, backgroundColor[connectorCapability]], nodeId: data.id, }); }