Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New codemod to prefix transient prop names with $ #12

Open
kylecombes opened this issue Sep 14, 2023 · 2 comments
Open

New codemod to prefix transient prop names with $ #12

kylecombes opened this issue Sep 14, 2023 · 2 comments

Comments

@kylecombes
Copy link

I can't tell if this repo is still active, but I'll post this here anyway.

With styled-components v6, automatic prop filtering was dropped, meaning props that should not be forwarded to the underlying DOM elements should be prefixed with a $. Doing this manually is extremely tedious and laborious.

Performing this rename seems like something that a codemod should be able to do. It might not get everything completely right (i.e. devs should still probably look over the changes it makes), but it should be able to at least find all of the places in code where a $ prefix may need to be added.

Is this something someone here could create? I've never written a codemod before.

@RmnRss
Copy link

RmnRss commented May 16, 2024

@kylecombes do you have any news on this, or have you found a codemod to do so ?

@mohab-sameh
Copy link

@kylecombes @RmnRss Maybe we can whip up something with Codemod Studio. Can you give me a few before/after snippets of the transformation? If it's from your actual project, that's a plus.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants