-
-
Notifications
You must be signed in to change notification settings - Fork 86
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Draft: v4 #381
base: master
Are you sure you want to change the base?
Draft: v4 #381
Conversation
@francoismassart Hey, thanks for the great plugin. I was just thinking how is the v4 rewrite going? Is it still happening and if so, do you have a rough idea when it might land? I cant imagine using tw without this plugin so it is basically a v4 blocker for me :D No pressure :D |
It might be useful to re-evaluate the necessity and priority of rules and only implement 2 or 3 most important for tw4. Here are the current rules with my personal opinion:
I understand that to implement the 1st rule it is necessary to build the foundation of the plugin (resolving config etc). But maybe it is something that can be inspired from the prettier tw plugin. Then I would suggest to implement these rules, possibly each in a separate release to split the work into smaller chunks:
It is possible that after the foundation and the 1st rule is done, someone else contributes the next rule (I would). Later releases might include:
The rest is questionable imho. |
Does this mean peoples also needs the prettier plugin to be able to sort classes?
A |
Tailwind has an official prettier plugin for sorting https://tailwindcss.com/docs/editor-setup#class-sorting-with-prettier . I am using it even now and disabled the eslint sorting rule. No need to re-implement something that already exists.
There is a CLI tool to migrate to v4 which should take care of everything. Such rule is usable only once, after the migration, and then it is useless. You can do it manually instead of using linter for that. |
Shit! I should do my homework to search PRs, my bad: But, because this PR has seemed stale for a long time, I might be going to working on my "urgent temporary solution", feel free to close that one or just continue my work, I see this PR just delete all the files. |
A quick note on #381 (comment):
Although prettier-plugin-tailwindcss has the 'official' status and is mainted by the TailwindCSS team, it is doing something unconventional for Prettier. See Prettier docs:
Reordering classnames inside a string is out of Prettier’s scope, including its plugins.
|
v4 Draft
Description