Skip to content
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

feat: Replace prettier-plugin-tailwindcss with eslint-plugin-tailwindcss? #1616

Closed
CodeWithShreyans opened this issue Oct 21, 2023 · 5 comments
Labels
🌟 enhancement New feature or request

Comments

@CodeWithShreyans
Copy link

Is your feature request related to a problem? Please describe.

IMO eslint-plugin-tailwindcss offers a better experience than the official prettier plugin.
It also comes with a few other rules for strictness and readability.

Describe the solution you'd like to see

Replace prettier-plugin-tailwindcss with eslint-plugin-tailwindcss by default.

Describe alternate solutions

N/A

Additional information

Can open a PR if enough people are interested.

@CodeWithShreyans CodeWithShreyans added the 🌟 enhancement New feature or request label Oct 21, 2023
@ronanru
Copy link
Contributor

ronanru commented Oct 22, 2023

prettier plugin is what tailwind team recommends

@CodeWithShreyans
Copy link
Author

Yeah that's true but at least partly because it's their official plugin.
I think it's about what can give a better experience and what people would prefer by default.

@juliusmarminge
Copy link
Member

I dont think it makes sense to switch the default here;

  • Formstting with a linter isnt the best, and from my experience just slows down your editor. Eslint is already slow as is so using it for formatting only makes it worse? I've never had prettier die on me.

  • Iirc it took the eslint plugin quite a while for adding support for esm/ts config support (not sure if it even has it now but i assume it does), the prettier plugin had it day 1. Using the eslint plugin would perhaps "delay" us from updating the dependency for new tailwind releases?

I like the idea of the eslint plugin and it got some rules that are kinda nice, but i think there are more gotchas than benefits that makes the official prettier plugin a better default

@juliusmarminge juliusmarminge closed this as not planned Won't fix, can't repro, duplicate, stale Oct 29, 2023
@CodeWithShreyans
Copy link
Author

makes sense, thanks for considering it!

@FleetAdmiralJakob
Copy link

Could we rename this issue and talk about if we want to add the eslint-plugin-tailwindcss without its formatting which relies on the prettier plugin since the 3.6 anyways?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🌟 enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants