Lint and adoption
Find hard-coded values and measure how much comes from the system.
basemode lint finds values in your code that should come from the design system, and measures how much of your styling already does.
basemode lint src --tokens src/tokens/basemode.lock.json
src/pricing/plan-card.tsx:14:22: #2563eb is already a token: use var(--action-primary).
1 hard-coded values in 212 files, 1 already tokens.
Adoption: 97% of design values come from the system (138 of 412 tokens in use).
What it checks
Colors, spacing, radii and font sizes in stylesheets and components. Each finding is one of two kinds:
- Already a token: the exact value exists in the system. Swap it in; nothing changes on screen.
- Not in the system: the closest tokens are suggested, and someone decides whether to use one or add a token.
In CI
The command exits 1 when it finds anything, so it can gate a pull request:
- run: uvx --from basemode-tokens basemode lint src --tokens src/tokens/basemode.lock.json
Adoption over time
On plans with automatic pull requests, Basemode measures adoption in the repository on every sync, so you can see the number move without running anything.