Skip to content

Baselines

A baseline lets a repo with existing style violations adopt stylist without the first commit drowning in historical debt: current violations are recorded as accepted, only new violations fail checks, and the accepted debt stays visible for the dashboard.

Terminal window
stylist baseline

This checks every checkable asset under the project root (the directory containing .stylist.yaml), including HTML, Markdown, Word, PowerPoint, SVG, and raster images, and writes .stylist-baseline.yaml next to it. Check the file in. It is the repo’s reviewed, versioned statement of accepted debt:

ruleset: acme-brand-v1
generated: 2026-07-07T10:12:03Z
entries:
- file: legacy/pricing.html
check: terms
snippet: cheap
- file: legacy/pricing.html
check: colors
snippet: "#ff4136"

Entries match on content identity, the tuple (file, check, snippet), not line numbers. Editing a file neither resurrects baselined violations (lines shifting) nor suppresses new ones that happen to land on an old line. The trade-off: a baselined snippet is accepted anywhere in that file, including newly added occurrences of the same value.

Baselined violations still appear in verdicts, marked "baselined": true, and are counted separately by the dashboard as tracked debt. They just no longer fail the check.

Re-running stylist baseline may shrink the baseline freely (you fixed things, and the file reflects it). It refuses to grow:

stylist: refusing to grow the baseline: 3 new violation(s) since it was
last accepted, e.g. colors "#bada55" in landing.html
Fix the new violations, or re-run with --allow-growth to accept them as debt.

Growth requires the explicit --allow-growth flag. Without the ratchet, re-baselining would quietly absorb every new violation and the tool would stop meaning anything.

The baseline is found automatically when .stylist-baseline.yaml sits next to .stylist.yaml. Override with the baseline: config key or STYLIST_BASELINE. Baselines are always client-side: they describe a repo, not the org, and belong in that repo’s history.