Rules
Every finding Airframe reports links to its page here, at https://airframe.uijig.com/rules/<id>/. airframe rules lists the lint rules, and airframe explain <rule> prints a page offline.
Loading the project
Section titled “Loading the project”Reported while Airframe reads the project, before any check runs. Nothing else is checked until they are fixed.
| Rule | Default severity | Since | What it reports |
|---|---|---|---|
| alias-cycle | error | v0.1.0 | Tokens alias each other in a loop, so none of them has a value. |
| alias-type-mismatch | error | v0.1.0 | A token aliases a token of a different $type. |
| alias-unresolved | error | v0.1.0 | A token aliases a token that is not defined. |
| config-missing | error | v0.1.0 | There is no airframe.yaml at the project root. |
| emit-failed | error | v0.1.0 | A platform’s emitter could not write its output. |
| json-syntax | error | v0.1.0 | A token file is not valid JSON. |
| mode-ambiguous | error | v0.1.0 | Two of a token’s mode keys both match some context and give different values. |
| mode-base-value | error | v0.1.0 | A mode key names an axis’s base value, the one that $value already is. |
| mode-override-conflict | error | v0.1.0 | A token defines the same mode key twice: once in its own modes, and once in a mode file. |
| mode-unknown | error | v0.1.0 | A mode key names an axis or a value that airframe.yaml does not declare. |
| no-tokens | error | v0.1.0 | The content directory holds no *.tokens.json files. |
| schema-invalid | error | v0.1.0 | A file does not match its schema: an unknown key, a missing field, or a value of the wrong shape. |
| token-name-invalid | error | v0.1.0 | A token or group name is not lowercase words joined by -. |
| type-unsupported | error | v0.1.0 | A token’s $type is not one Airframe supports. |
| yaml-syntax | error | v0.1.0 | airframe.yaml, invariants.yaml or a components/<id>.yaml is not valid YAML. |
Checks
Section titled “Checks”Lint checks of the loaded project: tiers, modes, invariants, consumers and components.
| Rule | Default severity | Since | What it reports |
|---|---|---|---|
| accent-flip | error | v0.1.0 | A token’s hue moves more than 1° between appearances, which a same-hue-across-appearances invariant forbids. |
| accent-group-partial | error | v0.1.0 | An accent mode value sets some of the roles accentGroups.required lists, but not all. |
| component-incomplete | error | v0.7.0 | A component’s implementations or hostedBy is not complete and true: an unknown or missing platform, a file that does not exist, an n/a with no reason, an unknown host or a host cycle. |
| component-unruled | error | v0.7.0 | A component, or a retired treatment’s ruling, does not answer to a ruled Gantry ruling: it is missing, malformed, unknown or not ruled. |
| contrast-below | error | v0.1.0 | A contrast invariant’s foreground on its background falls below the minimum ratio in some context. Axes the invariant does not iterate sit at their base value, so the render with no attribute set is always checked. |
| density-missing | error | v0.1.0 | A component dimension lacks a value for every density and gives no chrome reason. |
| dimension-below | error | v0.1.0 | A dimension that a min-dimension invariant matches resolves below its minimum in some context. The contexts include the base one, the render with no attribute set, where the token is its $value. |
| emitted-stale | error | v0.1.0 | A generated output differs from what airframe build would write, or is missing. A colorset in a catalog folder airframe wrote (its Contents.json says "author": "airframe") that no token makes any more, after a rename or removal, is stale too. |
| exemption-without-reason | error | v0.1.0 | A token is exempt from a rule but gives no reason. |
| fallback-literal | warn | v0.6.0 | A consumer var() has a literal fallback, which hides a missing token. |
| hue-reserved | error | v0.1.0 | A colour within a reserved hue’s tolerance belongs to a token the invariant does not allow. |
| literal-in-semantic | error | v0.1.0 | A semantic token, or one of its mode values, is a literal instead of an alias to a primitive. |
| not-formatted | error | v0.1.0 | A token, config, invariants or component file differs from what airframe fmt would write. |
| prefix-multiple-hues | error | v0.1.0 | Colour tokens that share a first name segment span more than 8° of hue. |
| primitive-read-by-consumer | error | v0.6.0 | A consumer file reads a token whose tier consumers may not read, such as a primitive. |
| reference-undeclared | error | v0.6.0 | A consumer file reads a token name that does not exist, or a platform’s consumers glob matches no file. |
| retired-used | error | v0.7.0 | Consumer code reads a retired token or spells a retired treatment, or a token aliases a retired token. |
| tier-violation | error | v0.1.0 | A token aliases a token its tier may not read. |
| token-owner-violation | error | v0.6.0 | A consumer file reads a component token but matches none of the component’s owners globs. |
| token-unclassified | error | v0.1.0 | A token has no tier, or is a component token that names no component. |
| wrapper-unmapped | error | v0.6.0 | A read through a declared wrapper root maps to no token. |
Building
Section titled “Building”Reported by airframe build and by lint when an output cannot be written.
| Rule | Default severity | Since | What it reports |
|---|---|---|---|
| emit-axis-fixed | warn | v0.3.0 | A native platform emits a token that varies on a build-bound axis it does not fan out over, so it uses the axis’s base value. |
Import findings
Section titled “Import findings”Reported by airframe import css, not by lint, so airframe rules does not list them.
| Rule | Default severity | Since | What it reports |
|---|---|---|---|
| import-css-syntax | error | v0.2.0 | A stylesheet given to airframe import css is not well-formed CSS, or uses syntax the importer does not read. |
| import-duplicate | warn | v0.2.0 | The same custom property is declared twice for the same mode; the later declaration wins. |
| import-fallback-dropped | warn | v0.2.0 | A var() alias has a fallback value, which the importer drops. |
| import-name-invalid | error | v0.2.0 | A custom property’s name, without the leading --, is not a valid token name. |
| import-no-base | error | v0.2.0 | A custom property is set only under some mode, never on bare :root, so its token would have no $value. |
| import-not-equivalent | error | v0.2.0 | The CSS Airframe would generate from the imported tokens resolves a custom property differently from the original stylesheet in some environment. |
| import-nothing | error | v0.2.0 | The import found nothing to import, or nothing it could check. |
| import-too-many-environments | error | v0.2.0 | The stylesheets mention so many attributes and media features that the equivalence check would compare more than 200,000 environments. |
| import-type-conflict | error | v0.2.0 | One custom property holds values of different types in different modes. |
| import-unmapped-scope | error | v0.2.0 | A rule’s selector and media conditions are well-formed, but no mode key in airframe.yaml is spelled that way on the web. |
| import-unsupported-at-rule | error | v0.2.0 | A stylesheet uses an at-rule other than @media, which the importer does not read. |
| import-unsupported-media | error | v0.2.0 | A rule sits inside an @media condition the importer does not read. |
| import-unsupported-selector | error | v0.2.0 | A rule’s selector is not :root with attribute conditions, so the importer cannot tell which mode it sets. |
| import-unsupported-value | error | v0.2.0 | A custom property’s value is not one the importer can turn into a token value. |
Retired
Section titled “Retired”No release reports these any more. Each keeps its page, because rule IDs are addresses.
| Rule | Default severity | Since | Retired in | What it reported |
|---|---|---|---|---|
| emit-unsupported | warn | v0.1.0 | v0.5.0 | A platform emitted a format that release of Airframe did not build yet. |