-
-
Notifications
You must be signed in to change notification settings - Fork 62
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] Automatic whitespace removal #263
Comments
👋 @francoismassart! Would you be willing to a accept a PR for this? |
Hey please can we have this PR approved looks like common issue to put extra spaces in classNames |
I think it's a good suggestion,i need it. |
Any update on this? |
Happy to try a PR if it has chances to get released. The latest commit on |
Is there no progress on this? Would be a killer feature as tailwind intellisense extension stopped supporting this too. |
👋 @francoismassart, congrats on a new release and thanks for merging #308! Glad that you’re still looking after this plugin. WDYT of |
|
Is there no progress on this? |
Is your feature request related to a problem? Please describe.
When using TailwindCSS, my teammates and I often end up with multiple spaces in the list of classes:
When we apply autofix (
tailwindcss/classnames-order
), class names are reordered but extra spaces between them are not removed:Describe the solution you'd like
I understand that certain teams might want to keep the original spacing, e.g. when someone wants to align class names of different width. However, it’d be great to have an option to auto-remove them:
How about a new rule, say,
tailwind/whitespace
?Describe alternatives you've considered
I looked around for potential ESLint rules in other plugins but could not find anything that would cover this case. Even if there exists something for
className="..."
outsideeslint-plugin-tailwindcss
, that solution would not be ideal. Spaces should be removed from all TailwindCSS-related strings, e.g. insidecn()
and other configured functions. So it feels like this rule does belong to this plugin.Additional context
See #1, which is the original feature request for this behavior. The issue was fixed in 46717c8 but was then discontinued in #126. You can tell this by the removal of a relevant test case.
The text was updated successfully, but these errors were encountered: