Reformatting of function interpolated in styled-components template literal

Hi,

I'm running into a bit of an issue with the auto reformatting function. I can't seem to get WebStorm to indent a function in a template literal, such as:

const StyledComponent = styled(TextField)`
width: 100px;
height: ${props => {
return props.height;
}};
`;

When formatting runs it is changed to:

const StyledComponent = styled(TextField)`
width: 100px;
height: ${props => {
return props.height;
}};
`;

I've gone through the code style options with this particular sample posted in the preview, but I couldn't find a rule that would indent the interpolation the way I'd like it to. Any hints are appreciated!

1 comment
Comment actions Permalink

The issue is caused by

${props => {...}}

interpolation; please vote for https://youtrack.jetbrains.com/issue/WEB-28540 to be notified on any progress with it

 
0

Please sign in to leave a comment.