From a3a20f53d66e88637e0b53a7a9b23d6dac6ea0d5 Mon Sep 17 00:00:00 2001 From: znetsixe Date: Fri, 29 May 2026 19:19:00 +0200 Subject: [PATCH] fix(examples,flow-lint): all example flows lint-clean of errors MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - flow-lint: strip comments before the payload:null check so a comment that merely mentions `{ payload: null }` no longer false-positives (this was the only "error" on MGC 02-Dashboard; its fan-out is actually correct). - Bump monster, rotatingMachine, coresync, machineGroupControl — ui-chart required-property + numeric width/height fixes. Co-Authored-By: Claude Opus 4.8 (1M context) --- nodes/coresync | 2 +- nodes/machineGroupControl | 2 +- nodes/monster | 2 +- nodes/rotatingMachine | 2 +- tools/flow-lint/bin/flow-lint.js | 8 +++++++- 5 files changed, 11 insertions(+), 5 deletions(-) diff --git a/nodes/coresync b/nodes/coresync index 21d77a8..e05fe62 160000 --- a/nodes/coresync +++ b/nodes/coresync @@ -1 +1 @@ -Subproject commit 21d77a8afa2a0754255c08d478edc3c9bfbb49e0 +Subproject commit e05fe62db9ee27de2beda64eaeb155579279b8d9 diff --git a/nodes/machineGroupControl b/nodes/machineGroupControl index 19720bd..ef265dd 160000 --- a/nodes/machineGroupControl +++ b/nodes/machineGroupControl @@ -1 +1 @@ -Subproject commit 19720bd67f8c6fffc1705f53c63a4a04538845d4 +Subproject commit ef265dd81172d32efba974a5e5e30e3852bb3d18 diff --git a/nodes/monster b/nodes/monster index 9427b64..965e3ba 160000 --- a/nodes/monster +++ b/nodes/monster @@ -1 +1 @@ -Subproject commit 9427b64bbeaf0f39ac33bc35509be12676d7c77d +Subproject commit 965e3ba3059860912c6c1eb58a2a0df5082a6e63 diff --git a/nodes/rotatingMachine b/nodes/rotatingMachine index 0a3a0be..00e3530 160000 --- a/nodes/rotatingMachine +++ b/nodes/rotatingMachine @@ -1 +1 @@ -Subproject commit 0a3a0be15bab24c4d03180c66146451e9bfec57b +Subproject commit 00e35302b43ad2c61f5d768fa746a36f3db0efae diff --git a/tools/flow-lint/bin/flow-lint.js b/tools/flow-lint/bin/flow-lint.js index dee2c85..fe6f2c8 100644 --- a/tools/flow-lint/bin/flow-lint.js +++ b/tools/flow-lint/bin/flow-lint.js @@ -185,7 +185,13 @@ function checkFunctionFanOut(n, findings) { msg: `function "${n.name || n.id}" declares outputs=${outputs} but wires has ${Array.isArray(n.wires) ? n.wires.length : 'no'} arrays.`, }); } - if (typeof n.func === 'string' && /payload\s*:\s*null\b/.test(n.func)) { + // Strip comments first — a comment that merely *mentions* `{ payload: null }` + // (e.g. explaining why the code avoids it) must not trip the rule. Heuristic, + // not a full parser, but it kills the common false positive. + const funcCode = typeof n.func === 'string' + ? n.func.replace(/\/\*[\s\S]*?\*\//g, '').replace(/\/\/[^\n]*/g, '') + : ''; + if (/payload\s*:\s*null\b/.test(funcCode)) { findings.push({ rule: 'FN_PAYLOAD_NULL_LITERAL', severity: 'error',