Closed ml closed 4 months ago
@arybitskiy can you check this please.
@all-contributors add @ml for bug
@mohab-sameh
I've put up a pull request to add @ml! :tada:
Thanks for reporting @ml, the issue will be fixed in the next CLI release.
@ml issue if fixed in codemod@0.10.20
.
codemod react/prop-types-typescript --preserve-prop-types='all'
should preserve prop types definitions.
I just copy-pasted the components, but I believe their content is irrelevant. The problem is that the codemod doesn't respect passed options.
Faulty codemod
react-prop-types-typescript
doesn't respect thepreserver-prop-types
(in both VS Code and CLI).Code before transformation
Expected code after transformation
Actual code after transformation
Estimated severity
It's quite a sever issue to us. We have hundreds of components we want to add types to, preserving prop types. Doing it manually is not an option.
Looks like a trivial issue to fix. The codemod doesn't pick up the
preserver-prop-types
option, neither from VS Code nor from the console. Feels like a typo to me, but I couldn't find a way to debug it myself.Environment: