Design System Linter #226
RemyMachado
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
When exporting the theme, we have certain variables restrictions.
For instance Tailwind allows by default:
[
--radius-xs,--radius-4xl]However, Tweakcn might only export these vars:
[
--radius-sm,--radius-xl].This has a direct impact on the Tailwind utilities we use:
It makes sense since fewer choices = more consistent UI.
However, how do we enforce these rules in our linter to only allow using the theme's variables?
Using
rounded-xsshould be forbidden since--radius-xsis not part of the theme.Currently, I'm about to manually define the rules one by one in Eslint with an allow/forbid list, but I was curious to hear if you had a more adequate solution.
Beta Was this translation helpful? Give feedback.
All reactions