-
Notifications
You must be signed in to change notification settings - Fork 928
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
Add prettier-plugin-tailwindcss to sort tailwindcss classes #393
Add prettier-plugin-tailwindcss to sort tailwindcss classes #393
Conversation
Hey @portdeveloper, thanks for pr! |
Thanks for the insight. I am glad to hear that it is working out great for you! I think there might be a problem with my machine... |
Tysm Port and Rinnat 🙌 I tried this on NOTE : My Screen.Recording.2023-07-02.at.3.13.06.PM.movAfter researching some, I found this discussion:
|
One thing I noticed about prettier-plugin-tailwindcss is that it does not remove extra whitespaces in the classNames, and sometimes it just changes the places of two classes over and over again. This will hinder standardization. For now we can say that this is ready for review |
Yeah, I have noticed sometimes this issue too !! Due to some issues in the plugin and also, I went through a few discussion's on this, and seems like not everyone likes it Obviously, this is considered as best practice to have in "tailwind zone" but I think it not worth adding at the moment in SE-2 😅 due to some issues, maybe in future in se-2-docs if we have a section regarding best-practices/ extra tools we are for sure gonna recommend this !! But tysm @portdeveloper for this, really appreciate it !! |
Has anyone found a fix for this? This issue makes it really hard to use format check in CI. At this point I've tried everything mentioned in this PR and some other things to no avail:
Did you find time to do this? Couldn't find any issues you authored. I failed to replicate this issue with new Next.js + DaisyUI + Tailwind + ESLint + Prettier (w/ @trivago/prettier-plugin-sort-imports and prettier-plugin-tailwindcss) even with the exact versions and configs, wondering whether it has something to do with the monorepo structure. I'll post an update here if I figure it out. |
I didn't open an issue and basically forgot about it. I think there is a vscode extension that does the same thing. If one day, there exists a solution for this that could be added to a CI/CD pipeline of a project, it will be great as a lot of the devs i saw, including me, just dont care about the order of tailwind classes. |
Adding this in case someone who struggles with this stumbles on this: My issue was that I was using
|
Description
This PR adds prettier-plugin-tailwindcss to scaffold-eth-2.
By using prettier-plugin-tailwindcss, this PR aims to achieve consistency in classNames across projects using scaffold-eth-2.
Also, all necessary files that contain tailwind classes are sorted.
Additional Information
Your ENS/address: portdev.eth