简体   繁体   中英

Formatting styled-components in PhpStorm

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:)

在此处输入图像描述

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM