fix(examples,flow-lint): all example flows lint-clean of errors

- 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) <noreply@anthropic.com>
This commit is contained in:
znetsixe
2026-05-29 19:19:00 +02:00
parent c932382022
commit a3a20f53d6
5 changed files with 11 additions and 5 deletions

View File

@@ -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',