typescript-plugin-styled-components
typescript-plugin-styled-components copied to clipboard
Doesn't transform styled components with config
StyledComponentsTransformer ignores styled components with config like this:
const Box = styled.div.withConfig<Props>({
shouldForwardProp: (prop, defaultValidatorFn) =>
!['display'].includes(prop) && defaultValidatorFn(prop),
})`
display: ${prop => prop.display};
`;
Hm, it's not supported because withConfig was not part of the public surface.
I guess it was changed some time ago. I would argue if you use useConfig manually it should opt out of display name generation. I will need to investigate how well it would be working with multiple useConfig.