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

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

Component pages and generated files are fresh

MUSTbloqueacomprobaciónactiva
The pages in /design/components, the data file, the manifest and the stories are what sync writes from the component headers now.
Por qué: The lenses, the manifest and the stories read the generated files, not the code. If a header changes and sync is not run, the catalog shows a component that no longer exists, and an edit made by hand in a generated file is lost at the next sync.
Enforcer: checks/fresh.ts
Campos de la página (15)
ruleIdDSC-R01
requirementThe pages in /design/components, the data file, the manifest and the stories are what sync writes from the component headers now.
levelMUST
floorfalse
statusactive
spheredesign
appliesTo/design
enforcers.shtukbase/packages/design-components/checks/fresh.ts
enforcerKindgate
modeenforce
becauseThe lenses, the manifest and the stories read the generated files, not the code. If a header changes and sync is not run, the catalog shows a component that no longer exists, and an edit made by hand in a generated file is lost at the next sync.
baseline0
reviewBy2027-05-29
packdesign-components
railRun: shtuk run design-components sync. Change the header in the code file, not the page header.

The pages in /design/components, lib/design/components.data.js, /design/custom-elements.json and /design/stories/*.stories.js match what sync writes from the component headers now.

What counts as a violation. A page or generated file is missing or differs from what sync would write; a page the sync wrote has no component header any more; a header does not parse (then sync cannot run). The text under a page's header is the author's and is not compared.

Why. The lenses, the manifest and the stories read the generated files, not the code. If a header changes and sync is not run, the catalog shows a component that is gone, and an edit made by hand in a generated file is lost at the next sync.

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

How to fix. shtuk run design-components sync. Change the header in the code file, not the header of the page.

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