Lint your DESIGN.md as you type. Catches broken design-token references, WCAG contrast failures, missing typography, and out-of-order sections — right in the editor, before they land in a PR.
What it checks
| Rule | Severity | Checks |
|---|---|---|
missing-colors |
error | No colors section defined |
missing-primary |
warning | No primary color |
broken-ref |
error | Token reference {x.y} doesn't resolve |
contrast-ratio |
warning | Component bg/fg below WCAG AA (4.5:1) |
orphaned-tokens |
warning | Color defined but never used in components |
missing-typography |
warning | No typography tokens |
missing-sections |
info | No spacing or rounded scale |
section-order |
warning | Sections out of canonical order |
parse-error |
error | YAML front matter malformed |
Usage
Open a DESIGN.md file (or whatever filename you've configured — see below). DriftGuard lints it automatically on open, on save, and while you type (debounced), showing findings as inline diagnostics in the Problems panel.
Run DriftGuard: Lint current DESIGN.md from the Command Palette to lint on demand.
Configuration
| Setting | Default | Description |
|---|---|---|
driftguard.filenamePattern |
DESIGN.md |
Filename (case-insensitive) that DriftGuard treats as a design spec. Matched on basename. |
driftguard.runOnType |
true |
Re-lint while typing (debounced). Disable to only lint on save. |
driftguard.debounceMs |
300 |
Debounce delay for on-type linting, in milliseconds. |
Design spec format
DESIGN.md starts with a YAML front-matter block defining your design tokens (colors, typography, spacing, etc.), followed by Markdown documentation. See the project README for the full spec and the GitHub App that enforces the same rules on pull requests.