C05

Warning

Components

C05 — A positional argument a built-in does not take

The built-in takes its arguments by name; one written without a name is not given to anything.

What the compiler said

warning[C05]: Divider takes no positional argument --> src/App.wf:3:13 | 3 | Divider("thin") | ^ = help: Name it: the registry lists the props it takes = docs: https://webfluent.monzeromer.dev/errors/C05

The fix

Broken

wf

page P(path: "/", title: "T", description: "D") { Heading("Rule").h1 Divider("thin") }

Fixed

wf

page P(path: "/", title: "T", description: "D") { Heading("Rule").h1 Divider() }

Name it, with one of the props the built-in takes.

Each example is a whole program: it is all of src/App.wf in a project with no other .wf file (trying an example).

Why this rule exists

Warning.

lints may lower it:

"lints": { "C05": "off" } // wf-allow(C05)