Reputation: 1630
I'm using PhpStorm. I'm using Styled and Components & Styled JSX plugin for support for styled components. It is very useful because it provides cool features like code completion and suggestions. However, it could be really useful if I could format code that I'm writing. Does anyone know how can I format styled-components code in PhpStorm?
In the picture you can see that the code is not formatted and unless I formatted it myself it will stay as it is. Thanks in advance :)
Upvotes: 1
Views: 1474
Reputation: 93738
Auto-formatting doesn't work as expected in injected CSS with interpolations, please follow WEB-28540 for updates. See https://youtrack.jetbrains.com/issue/WEB-32048#focus=streamItem-27-3300923.0-0 for details
Related Styled and Components & Styled JSX plugin plugin issue: https://github.com/styled-components/webstorm-styled-components/issues/60
Upvotes: 1