function-used-as-a-tag
This fails the run. Where it is wrong about your code, // ramonda-check-ignore <reason> on the line says so, and the reason is printed on every run.
Reported when a plain function is written in tag position, where it names nothing the framework can construct — and the compiler only refuses the shapes that do not return exactly one element.
The framework reports the same fault while running, as RMD011 — but only once the line actually runs. This is the same fault proved from the source instead.
Ramonda's unit is the class. A function has nothing to construct, no state and no lifecycle, so in tag position it names nothing the framework can hold on to.
For markup you want to reuse without state, call the function in an expression slot —
{sideBar()} — where it reads as the value it is. For state or lifecycle with no markup of
its own, that is a Hook. For both, make it a component.
The compiler catches part of this by itself: JSX.ElementType is left undeclared, so its
default rule applies and a tag returning several nodes, or anything that is not a node, is
TS2786. What it accepts is a function returning exactly ONE element — which is how a
function component gets written by habit, and why this rule exists.
None of this restricts arrays. A component returning several nodes is the ordinary case, and
so is {rows()}. Only tag position is constrained.
Next
- All rules — the other checks this one runs beside.
- Checking your app — how to run it, and what it proves.