Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature request] Prevent unknown classes (that follow Tailwind convention) #367

Open
nicooprat opened this issue Oct 14, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@nicooprat
Copy link

Is your feature request related to a problem? Please describe.
Example: in our team, some developers keep confusing gray and grey.

Describe the solution you'd like
Would be cool to report bg-gray-100 as an error because it follows Tailwind convention but doesn't exist.

Describe alternatives you've considered

  • We'd rather not duplicate the entries in the theme to prevent confusion & bloat in every tools (like IDE autocomplete, Storybook, ...).
  • I thought about using no-restricted-syntax ESLint rule but it won't cover every case (Vue classes, @apply tags, ...)

Additional context
Add any other context or screenshots about the feature request here.

@nicooprat nicooprat added the enhancement New feature or request label Oct 14, 2024
@kachkaev
Copy link
Contributor

👋 @nicooprat! You should be able for that tailwindcss/no-custom-classname rule for that.

@nicooprat
Copy link
Author

Hi, thanks for the suggestion, I tried a few regexes with the whitelist option to match everything BUT not *-gray-*, without luck. I guess something like a blacklist would be easier in my case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants