Rule reference
The 9 V1 analyzer rules, severity defaults, and what each catches.
9 rules ship with V1. Each has a default severity you can change per project, plus a list of glob exceptions.
| Rule | Default | Category |
|---|---|---|
no-hardcoded-color | error | color |
no-arbitrary-spacing | error | spacing |
single-primary-button | warning | hierarchy |
require-empty-state | warning | pattern |
require-loading-state | warning | pattern |
consistent-radius | warning | pattern |
font-token-only | error | typography |
accessible-touch-target | error | a11y |
pattern-conformance | warning | pattern |
no-hardcoded-color
Default: error · category color
Hex / rgb / hsl / named colors in className or inline styles. Use
design tokens (Tailwind bg-primary, var(--color-primary), etc.).
no-arbitrary-spacing
Default: error · category spacing
Tailwind arbitrary values like p-[7px] and inline padding/margin off
the project spacing scale.
single-primary-button
Default: warning · category hierarchy
More than one filled / primary <Button> per component scope. Demote
extras to tinted / plain.
require-empty-state
Default: warning · category pattern
arr.map() rendering JSX without a length-zero branch. Add a fallback
for the empty case.
require-loading-state
Default: warning · category pattern
Async actions (fetch / axios / mutate / useQuery / useMutation
/ useSWR) without a tracked loading boolean (isLoading, pending,
inFlight, saving, fetching).
consistent-radius
Default: warning · category pattern
Multiple distinct radii inside a Card / Container / Panel /
Sheet subtree. Pick one radius scale.
font-token-only
Default: error · category typography
fontFamily declarations not from the project token list. Generic CSS
families (sans-serif, system-ui, etc.) and var() refs are allowed.
accessible-touch-target
Default: error · category a11y
React Native only. Pressable / TouchableOpacity / TouchableHighlight
without minHeight ≥ 44 AND minWidth ≥ 44.
pattern-conformance
Default: warning · category pattern
A page declared as a known page pattern that omits a required component
contract — e.g. a sign-in page missing its Form or Button. Pulls the
expected contracts from the page pattern spec.
Performance
The analyzer caches diagnostics in .windcraft/cache.json keyed by file
hash + a rule-set hash, so unchanged files skip re-parse on subsequent
runs. Rule list / config changes invalidate the whole cache.
For very large projects (>500 files), windcraft check --workers <n>
spreads parsing across N worker threads.