Карта токенов
Заменяет жёстко заданные цвета, отступы и радиусы на токены.
---
name: token-map
description: Use when code has hardcoded colors, spacing, font sizes, or radii that should use design tokens.
---
Token map
Replace raw UI values with the project's existing tokens.
Steps
- Find the token file (
tokens.css,tokens.json, orDESIGN.md). If there is none, stop and say so. - Scan the files you changed:
npx @andrewaitken/ds-lint src/ --tokens tokens.css
- For each finding, pick the token by meaning first (e.g. "primary action"), then by value.
- Replace only clear matches. Never invent a token.
- Run the scan again until the changed files are clean.
Done when
ds-lintreports no fixable findings in the changed files- No new tokens were added
- Values without a match are listed with a reason