Home
Bookmarks
Leagues
LEARN
Courses
Career Paths
Assessments
Tutorials
Arcade
Glossary
GROW
Certifications
Log in
Glossary
Log inSign up
Courses/Introduction to Design Systems/Design Tokens in Code: Style Dictionary to Production/
Exercise #8

Linting & Guardrails: Preventing Token Bypass

Creating design tokens does nothing if developers hardcode #3b82f6 or padding: 14px directly in CSS files.

Design system teams enforce ESLint and Stylelint rules:

  • stylelint-declaration-strict-value: Blocks raw hex colors, pixel values, and font-families, requiring token variables.
  • eslint-plugin-jsx-a11y: Enforces accessible names on icon buttons.

If a developer writes color: #ff0000;, CI fails immediately with: 'Error: Direct hex colors forbidden. Use var(--color-feedback-error) instead.'

Topics

The Single Source of Truth Problem in Cross-Platform Systems
What is Style Dictionary? The Industry Standard Token Compiler
Anatomy of the W3C Design Tokens Community Group (DTCG) Spec
Figma Variables API to Git Sync: The Automated Pipeline
Transforms & Formats in Style Dictionary
Integrating Design Tokens with Tailwind CSS
Token Versioning & Semantic Release
Linting & Guardrails: Preventing Token Bypass
Token Documentation: Generating Living Spec Pages
The Future of Tokens: Composite Tokens & Motion Curves

From lesson

1

Design Tokens in Code: Style Dictionary to Production

Level 6 · Engineering Pipelines & Enterprise Adoption

Top contributors

Community contribution details will appear here once real learner activity is available.

Share