ShtukbaseStandard
DSC-R03/norms/rules/design-components/DSC-R03.md

Este texto aún no está traducido. Debajo está el original en inglés.

A component does not use a component of a higher level

MUSTbloqueacomprobaciónactiva
A component uses only components of its own level or below (primitive, composite, block, page), and the uses do not go in a circle.
Por qué: The levels are what makes the library a tree: a button that is built from a card cannot be used inside a card. A dependency that points up, or in a circle, breaks the order the catalog and the registry rely on.
Campos de la página (15)
ruleIdDSC-R03
requirementA component uses only components of its own level or below (primitive, composite, block, page), and the uses do not go in a circle.
levelMUST
floorfalse
statusactive
spheredesign
appliesTo/design
enforcers.shtukbase/packages/design-components/checks/no-level-up.ts
enforcerKindgate
modeenforce
becauseThe levels are what makes the library a tree: a button that is built from a card cannot be used inside a card. A dependency that points up, or in a circle, breaks the order the catalog and the registry rely on.
baseline0
reviewBy2027-05-29
packdesign-components
railMove the shared part down into a primitive, or lift the component to the higher level.

A component uses only components of its own level or below (primitive < composite < block < page), and the uses do not go in a circle.

What counts as a violation. A primitive that uses a composite, a composite that uses a block, and so on up; or a component that reaches itself through its uses.

Why. The levels are what makes the library a tree: a button that is built from a card cannot be used inside a card. A dependency that points up, or in a circle, breaks the order the catalog and the registry rely on.

Run. shtuk run design-components no-level-up. A violation is a line, exit code 1.

How to fix. Move the shared part down into a primitive, or lift the component to the higher level.

El paquete Design components coloca esta página en /norms/rules/design-components/DSC-R03.md.Texto fuente