Prettier 2.3
prettier.io
prettier.io
<a href="#" class="relative inline-flex items-center px-4 py-2 border border-gray-300 text-sm font-medium rounded-md text-gray-700 bg-white hover:text-gray-500">
Previous
</a>
to <a
href="#"
class="
relative
inline-flex
items-center
px-4
py-2
border border-gray-300
text-sm
font-medium
rounded-md
text-gray-700
bg-white
hover:text-gray-500
"
>
Previous
</a>
The blog post specifically mentions Tailwind:> For layout frameworks such as Bootstrap and Tailwind CSS, which add many classes to an element, this is important for readability and maintainability vs. the previous behavior (keeping all classes on one line) or e.g. putting each class on its own line.
I don't know how many people find it more readable to have ten lines per opening tag and many screenfuls for any slightly nontrivial structure; certainly not me. I do know the feature was merged "despite the low interest from the community".[2] Worst of all, it is not configurable.
Here's hoping this misfeature can be reversed if there's enough community pushback.
[1] https://tailwindui.com/components/application-ui/navigation/...
[2] https://github.com/prettier/prettier/pull/7865#issuecomment-...