codemod icon indicating copy to clipboard operation
codemod copied to clipboard

[codemod][new] types-react: remove deprecated types related to mixins

Open alexbit-codemod opened this issue 1 year ago • 5 comments

on behalf of eps1lon:

"ComponentSpec and Mixin are now in create-react-class. It might be easiest to fork the deprecated-prop-types-types but with create-react-class instead of prop-types as the target package.

Needs real world codebase with usage to test on."

Note: The example section helps codemod contributors identify all the transformation patterns that this codemod should handle. Repeat before/after snippets for every transformation example you can find.

Code before transformation

//insert your code before transformation here

Code after transformation

//insert the expected **correct** output here

Applicability Criteria

Which types-react versions include the deprecated pattern?

Additional context or links

Add any other context about the problem here. This might include extra considerations, edge cases, relevant business logic, existing migration guides, relevant links, etc.

alexbit-codemod avatar May 19 '24 04:05 alexbit-codemod

@alexbit-codemod the before/after snippets are placeholders. Is that intentional? I cannot find a reference to:

"ComponentSpec and Mixin are now in create-react-class. It might be easiest to fork the deprecated-prop-types-types but with create-react-class instead of prop-types as the target package.

in the migration doc.

mohab-sameh avatar May 21 '24 10:05 mohab-sameh

i might have made a mistake with the link... @eps1lon has a separate repo and list of missing codemods...ill try to get that later

alexbit-codemod avatar Jun 21 '24 14:06 alexbit-codemod

or maybe you can try to find it yourself

alexbit-codemod avatar Jun 21 '24 14:06 alexbit-codemod

I could find the issue in @eps1lon's repo but it also doesn't have context about the before/after. @eps1lon if you can provide them, it would be great. Otherwise, I can investigate.

mohab-sameh avatar Jun 24 '24 10:06 mohab-sameh

I could find https://github.com/eps1lon/types-react-codemod/issues/361 in @eps1lon's repo but it also doesn't have context about the before/after.

Same as deprecated-prop-types-types but with ComponentSpec and Mixin and create-react-class instead of prop-types.

eps1lon avatar Jun 24 '24 11:06 eps1lon