Tailwind-Styled-Component icon indicating copy to clipboard operation
Tailwind-Styled-Component copied to clipboard

Auto format on save

Open olavblj opened this issue 2 years ago • 3 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.

olavblj avatar May 04 '22 11:05 olavblj

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

randallmlough avatar May 04 '22 15:05 randallmlough

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

olavblj avatar May 06 '22 14:05 olavblj

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

MathiasGilson avatar Jun 23 '22 16:06 MathiasGilson

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

dimitribarbot avatar Jan 16 '23 19:01 dimitribarbot