MathiasGilson / Tailwind-Styled-Component

Create Tailwind CSS React components like styled components with class names on multiple lines and conditional class rendering

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Auto format on save

olavblj opened this issue · comments

How would I go about getting formatting on save with this package? Really love the direction, but need to be able to paste in tailwind classes into a styled component and for them to automatically be split to each line when saving.

I'm not the owner of this library, but that's a job for Prettier or whatever your linter of choice is

Yes, do you have a prettier configuration that would do this?

Prettier does not format template strings unfortunately and a plugin would need to be made for that 😬

Hi, I've made the following prettier plugin that should help with this matter : prettier-plugin-tailwind-styled-components.
I hope it will help.