E113

Error

Syntax and structure

E113 — An argument that cannot be positional

Only the first argument of a call may be written without its name, and only when the component declares a positional prop (_ name). Name the others.

What the compiler said

error[E113]: Only the first argument may be positional --> src/App.wf:4:20 | 4 | Card("Laptop", 999) | ^^^ = help: Name the others: `Button("Save", tone: .primary)` = docs: https://webfluent.monzeromer.dev/errors/E113

The fix

Broken

wf

component Card(_ name: String, price: Number = 0) { Text(name) } page P(path: "/", title: "T", description: "D") { Heading("Shop").h1 Card("Laptop", 999) }

Fixed

wf

component Product(_ name: String, price: Number = 0) { Text("{name}: {price}") } page P(path: "/", title: "T", description: "D") { Heading("Shop").h1 Product("Laptop", price: 999) }

Name the others: Card("Laptop", price: 999).

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

lints cannot lower it: it would ship a broken page.