codemod
codemod copied to clipboard
[codemod][new] types-react: remove deprecated types related to mixins
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
@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.
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
or maybe you can try to find it yourself
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.
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.