yaml-alias-not-allowed
What it catches
Section titled “What it catches”An anchor (&name), an alias (*name) or a merge key (<<) in
starboard.yaml, screens.yaml or a flow’s front matter. Each one is
reported at its line.
Why it matters
Section titled “Why it matters”Starboard never expands anchors and aliases, so an alias bomb costs nothing
and what you read in a file is exactly what Starboard reads. A
starboard.yaml or screens.yaml that uses them is not read at all, and
neither is the front matter of a flow that does. Aliases also hide repetition that a reader,
an agent or a diff should see: a change to a shared anchor silently changes
every screen that uses it. This is a correctness rule: it is always an
error.
How to fix
Section titled “How to fix”Write the repeated content out in full at each place it is used. If two screens really share a layout, consider whether they are one screen with different states, or whether the shared part is navigation that belongs in each layout anyway.
Example
Section titled “Example”Two tabs share a layout through an anchor:
screens: trip.timeline: title: Timeline area: trip presentation: tab layout: &tabs - region: tabs kind: tabs items: - {label: Timeline, to: trip.timeline} - {label: Checklist, to: trip.checklist} trip.checklist: title: Checklist area: trip presentation: tab layout: *tabsWrite the layout out under each screen:
screens: trip.checklist: title: Checklist area: trip presentation: tab layout: - region: tabs kind: tabs items: - {label: Timeline, to: trip.timeline} - {label: Checklist, to: trip.checklist} trip.timeline: title: Timeline area: trip presentation: tab layout: - region: tabs kind: tabs items: - {label: Timeline, to: trip.timeline} - {label: Checklist, to: trip.checklist}