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:
Submodule nodes/coresync updated: 21d77a8afa...e05fe62db9
Submodule nodes/machineGroupControl updated: 19720bd67f...ef265dd811
Submodule nodes/monster updated: 9427b64bbe...965e3ba305
Submodule nodes/rotatingMachine updated: 0a3a0be15b...00e35302b4
@@ -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.`,
|
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({
|
findings.push({
|
||||||
rule: 'FN_PAYLOAD_NULL_LITERAL',
|
rule: 'FN_PAYLOAD_NULL_LITERAL',
|
||||||
severity: 'error',
|
severity: 'error',
|
||||||
|
|||||||
Reference in New Issue
Block a user