-
-
Notifications
You must be signed in to change notification settings - Fork 96
Draft: v4 #381
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
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.
|
any hope on v4 support? |
* basic files setup * fix the workflows * add packageManager field * run on push only * docs: README * setting up internal eslint * add lint to workflows * docs: `defaultOptions` + TODO add configs
* chore: update packages * test: add JSX test cases
* refactor * playing with settings * settings
v4 Draft
Description