[Prettier Plugin]: support multiline class formatting #17770
DzmVasileusky
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Prettier doesn't support multiline formatting of classes right now, see prettier/prettier#7863
But I am very confused about this.
The original intention was to make formatting better for Tailwind users in 2021, and I came here as a Tailwind user to look how to increase readability in 2025.
Because both
and
are non-readable.
How about just letting it to respect printWidth and max members count?
It would look like this with printWidth: 80 and max member count - 6
Look how this plugin is working https://www.npmjs.com/package/eslint-plugin-readable-tailwind
It is really doing a great job with one big disadvantage - it is not a prettier plugin but eslint plugin.
But I really think you can get some ideas from their implementation and also allow semantic grouping or at least separating non-tailwind classes on a separate line
Beta Was this translation helpful? Give feedback.
All reactions