Duolith docs

Warnings while checking a page

W0100 Broken pack rule

Message {the rule's says}

Why

An app's packs (decision 0160) each own one topic of its conventions, such as its styles or its components, in packs/<topic>/pack.yaml. A rule there is a sentence an agent reads and, where the compiler can know it from the file alone, a check: classes allowed or denied, the theme tokens colours and spacing may use, kit parts that must not be imported because the app has its own component, modules a file must not import, elements and attributes that must not be used, style blocks, where a file must live, or the level of a built-in lint rule. This file breaks one of them. The help names the rule as topic/id; duolith explain topic/id prints it whole. A pack's rules skip the files the pack owns, so its own components may use what everyone else must not.

How to fix it

Do what the help says, usually using the app's own component, class or token instead. If the convention is wrong, change the pack's rule, not the file. A rule's level is warning unless its pack says error; duolith.yaml sets one by its id (lint: styles/one-button: off), and pack-rule: off turns every pack rule off.

In a terminal

duolith explain W0100

Mentioned in