-
Notifications
You must be signed in to change notification settings - Fork 138
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
Problem with eslint and prettier-plugin-tailwindcss [Prettier Plugin] #245
Comments
I'm having the same problem. |
Seems related to #244. |
This seems to me like your tailwind config isn't being picked up in some scenarios. Can you provide a reproduction? |
I was facing this issue today, for some reason |
I could reproduce this now a couple of times. The problem seems to be on vscode side. It happens when the tailwind classes are changed and saved without re-triggering vscode's format on save (think about finding and replacing the name of an animation in a refactor, or something like that). When this happens and you run the formatter via the cli, vscode can report that the formatting is wrong, when in reality it is correct. When you save the file, it formats it how it thinks it's correct, but now if you run the formatter again via the cli, it'll correct it. Once you understand that vscode is wrong here, reloading it (running reload window command, or killing and opening the app again) fixes the issue on vscode side. |
Hi @dani-mp 👋🏻 I had the same issue and you're right. The best option on my side was to kill Thanks 🙏🏻 |
If you are using |
Thank you @SugarDarius Same with WebStorm. Just close it completely and open, it will show you then that you have to reorder classes in the right way |
Restarting ESLint Server solved the eslint error. Press |
What version of
prettier-plugin-tailwindcss
are you using?v0.5.11
What version of Tailwind CSS are you using?
v3.3.0
What version of Node.js are you using?
v20.11.0
What package manager are you using?
npm
What operating system are you using?
macOS
Describe your issue
Hello everyone,
I've added to tailwind config new values - small, medium, large.
Now, when I add them to my files, the plugin sets the order as follows:
rounded-large h-[462px] w-[905px] bg-skin-fill-card px-14 py-20
however, when I run husky to test my code before committing, I get this error. How to fix it?
9:21 error Replace "rounded-large·h-[462px]·w-[905px]" with "h-[462px]·w-[905px]·rounded-large" prettier/prettier
I use the following devDependencies:
Config for prettier:
Thanks a lot for any help!
The text was updated successfully, but these errors were encountered: