A tiny linter for design tokens
Priya Raman
Frontend Engineer · Pune
- Jul 15, 2025
- 2 min read
- 7
Forty lines of Node that catch raw hex values before review does. The best tools in our studio are the ones nobody has to think about.
What we kept
We rebuilt the documentation site around live components rather than screenshots. It is slower to write but never lies, which turned out to matter more than speed.
- Document with live components
- Keep visual diffs small and named
- Remove plugins nobody opened this month
- Automate the release notes
The forty-line script
Visual regression output goes to a channel with one rule: every diff gets a reaction within a day. Fewer snapshots and better naming made the diffs short enough that people actually look.
Good design is as little design as possible.
Dieter Rams, Ten Principles for Good Design
const tokens = await load('tokens/core.json');
for (const [name, value] of Object.entries(tokens)) {
css += ` --${name}: ${value};n`;
}
What we rebuilt
Six months in, variables replaced most of our style duplication. Modes for light and dark themes held up well, while our first attempt at spacing variables was quietly deleted and redone.
A tiny lint rule now fails any pull request that introduces a raw hex value. It is forty lines of Node, runs in under a second, and has caught more drift than any design review.
As always, the files and notes behind this piece are in the studio archive. Ask and we will share what we can.
The short version: make the decision visible, make it reversible, and write down why. The rest is mostly patience.
Found this useful?
About the author
Priya Raman
Frontend Engineer · Pune
Priya builds the component library and the token pipeline behind it. She is happiest deleting CSS and writing small tools that make reviews shorter.
Kwame Mensah
Jul 17, 2025This is the first explanation of the topic that did not assume I already knew the answer. Thank you.
Priya Raman
Author Jul 18, 2025We are planning a follow-up after the next release. I will link it here.
Jules Martin
Jul 18, 2025Really clear write-up. The list in the middle is going straight into our onboarding doc.
Jules Martin
Jul 18, 2025Agreed. The review step is where these efforts usually go to die.
Aiko Tanaka
Author's pick Jul 24, 2025We shipped the same fix last month. Nice to know we were not the only ones fighting it.
Kwame Mensah
Aug 1, 2025I disagree slightly on the second point. In a larger org the ownership question gets much harder.
Diego Morales
Aug 1, 2025Did you measure anything before and after? I would love to show numbers to our leadership.