-
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
Plugin is incompatible with Prettier v3.0 #176
Comments
Same issue here after upgrading to prettier 3.0 |
It seems that you are currently utilizing prettier version |
Hey! For now we'd recommend downgrading to v2.8. Prettier v3.0 has some API changes that'll require a good bit of work and testing for our plugin. But it's on our radar! I'm going to be looking into this later this week or early next week. |
thanks for the information @thevuong @thecrypticace |
Thanks for the update! We'll stay on 2.8.8 for now. Thanks for your work @thecrypticace. |
While we're at it, I also noticed that prettier recently removed plugin autoloading (prettier/prettier#14759) in version 3.0.0, breaking configurations that rely on autoloading as the docs for this plugin recommend. |
@debashisbiswas The docs for this plugin explicitly recommended against autoloading and gave instructions for disabling it (when using it in conjunction with any other "compatible" plugin). We'll update the docs to remove any mention of autoloading once we've updated for v3.0. |
Node.js Version: v18.16.0 Here to confirm that rolling back to prettier v2.8 resolved the issue. Commands used:
|
Same issue here |
After downgrade, it`s works fine for me |
I don't know if this will work for you but after downgrading I had to reload my vscode for it to start working for me. I'm not using a |
Thanks @thecrypticace I'm looking forward to it @mutheusalmeida downgrading worked just fine maybe try @DitwanP |
Spent 3 hours on this (first time installation and first time prettier config). Works after downgrade. Thought I was losing my mind |
@stabildev Yeah didn't work for me either just by downgrading prettier. Had to uninstall both packages and then install them again (and I guess reloading the vscode window). |
It didn't work for me. |
For folks using vs code that are still having issues with version 2.8.8, you could try installing the specific Prettier extension version 9.13.0. I've found some backwards compatibility issues with the latest extension version. https://marketplace.visualstudio.com/items/esbenp.prettier-vscode/changelog |
same problem |
Hey all! We've just released v0.4.0 with support for both Prettier v2.x and v3.0. Please note that many plugins have yet to be updated for Prettier v3 so the third-party plugin compatibility has been temporarily disabled when using Prettier v3. Once plugins start migrating we will test them and do another release that implements compatibility with working third-party plugins where possible. So, for example, Svelte, Twig (Melody), Pug, Astro, etc… are not currently supported. We'll be keeping an eye on the plugins once they've updated and work toward another release which re-enables support. Please give the new version a test and open a new issue if you see any problems. Thanks for your patience! ✨ |
@vighnesh153 I'm pretty sure this is a change in Prettier itself rather than with our plugin. It may be related to the removal of plugin autoloading in Prettier v3 which means that you may need to specify the full path to the plugin. |
All working for me 👍 Thanks so much for the quick turnaround! |
Just leaving a comment here, for me this is still not working
devDep:
tailwind.config.cjs
prettier.config.js
Not sure what is wrong, I tried both v3 and v2.8 for prettier but still not working. when saving it wont format the classes. |
@martinharyanto Without the It is not a workaround, it it the new way to implement. Cause is the removed plugin autoloading in prettier v3 because of problems with package managers except npm. |
not working with above all commented pattern |
Took me way too long to get this to work, getting confused by the comments above... It was actually very simple and straight forward to get it to work with the 3.x branch of prettier. This is what worked for me:
{
"semi": false,
"tabWidth": 2,
// [..]
"plugins": ["prettier-plugin-tailwindcss"]
} |
Yes, it's working now and the issue is fixed |
@mutheusalmeida as I said, it works for me in a js. Maybe you are missing some extra configuration in your project. These are my prettier and eslint dependencies in case it can help you:
and this is my .eslintrc.js file
|
I understand that the issue with changes in the prettier v3 API requires a lot of changes. What I don't quite understand is why this issue is closed. Its more likely people will open new because they don't find an open issue related to their problem. |
Because it's fixed! |
I have:
My bad, its probably the vscode tailwind extension issue, because it does not automatically pick up the plugin anymore, so I have to add it to .prettierrc.json explicitly. I think its a good idea to do it anyway, but before I had it in the short syntax with the prefix convention ("tailwindcss" instead of "prettier-plugin-tailwindcss"). Changing it now to the full package name fixed it. |
|
I installed |
I went nuts on this.
My package.json
generateApiCode.js
my .prettierrc file This is not the best solution, but it works |
What version of
prettier-plugin-tailwindcss
are you using?v0.3.0
What version of Tailwind CSS are you using?
v3.3.2
What version of Node.js are you using?
v18.16.0
What package manager are you using?
npm
What operating system are you using?
macOS
Describe your issue
I've installed tailwindcss, prettier and prettier-plugin-tailwindcss in my new next js app. But the class is not sorting when I save the file.
I found this error on the vs code logs output
The text was updated successfully, but these errors were encountered: