tqwewe / prettier-plugin-tailwind

Sort tailwind classes in HTML with Prettier.

Home Page:https://www.npmjs.com/package/prettier-plugin-tailwind

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

package name on npm

fshareef opened this issue Β· comments

Hi @acidic9 πŸ‘‹

Thanks for making this project ❀️.

I made an attempt to do this on https://github.com/fshareef/prettier-plugin-tailwind but failed miserably due to my limited knowledge of the prettier project.

Seems like this project does what I needed back when I wanted to work on this.

I have the package name prettier-plugin-tailwind publised on npm, but I can easily unpublish it since it has no dependants. Since prettier recommends that plugins be named prettier-plugin-x, I thought you would be interested in getting the name I published my package under.

Would you be interested in deprecating this package and republishing it under the name prettier-plugin-tailwind?

Also, Adam Wathan has stated on some issue (I don't remember but I can find it) that he would be willing to host a project like this under the Tailwind org. Might be a good idea to get in touch with him so that this project can get more exposure.

Hi @fshareef,

I am truly happy to see this comment. Publishing this under prettier-plugin-tailwind would be so amazing and I am happy to do as you said.

Unfortunately there is currently an issue with prettier which prevents me from being able to add more support and features such as JSX support.
The issue is explained here: prettier/prettier#6113

I'm happy to go through with depricating this package and renaming it to prettier-plugin-tailwind as is! I hope prettier will provide an update to the issue so this package can be updated more.

@acidic9 Awesome!

Yeah the prettier plugin system is still in beta, and I remember workin on the plugin was not an enjoyable experience for me. I even got in contact with the core prettier team and they recommended forking the whole prettier project and re-writing the internal plugins πŸ€¦β€β™‚.

At least what you have is working πŸ˜„.

I'll try and find some time to help out and contribute to this project. I'd love to see more configuration options and support for .vue files.

Anyway the prettier-plugin-tailwind package has been unpublished and you can start working on deprecating this and re-publishing it under the new name. I recommend you do it fast before someone snags the name πŸ˜… .

EDIT: I also recommend telling people about this on the official Tailwind discord.

@fshareef Yeah and so painful that they don't put any time into adding the required support this package depends on :(

What I have working I believe is literally because of a bug in prettier. If you see my comment here prettier/prettier#6113 (comment) I wrote: My plugin is actually able to override an internal parser... but not a printer.
I truly hope the pull request can get some attention by the prettier team!

I did some refactoring which I've pushed into a new branch called refactor. That's where I'll be continuing development from once prettier updates with the PR.

I've tried publishing to prettier-plugin-tailwind, but unfortunately the NPM wont let a package under that name be published until 24 hours have passed. So I'll get onto it again tomorrow.

And yep I did directly post a message in the discord under #core-dev.

Updated - Now live on NPM as prettier-plugin-tailwind!