Open kopax opened 5 years ago
Since react-codemod
is providing its own CLI to call jscodeshift
, you could file an issue in react-codemod
asking them to document how to pass a --parser
option to jscodeshift
, because the default parser is obviously not correct for your project.
The default parser selection isn't very intelligent, and to make matters worse, even if you tell it to use the babel parser, it doesn't use your local babel config when parsing.
@gaearon, I know it's been two years, but does anyone still have this problem with react-codemod? (my apologies if you aren't one of the maintainers of the project, you were just one of the most visible names associated with it)
Hello, I am back after a 3-month retreat and I am now trying to upgrade my react version within my libraries as suggested by react
16.9.0
usingreact-codemod
that use under the hoodjscodeshift
.This is the project I am currently trying to upgrade: https://github.com/bootstrap-styled/v4
I was using react
16.8.4
and now I'd like to upgrade to react16.9.0
.I am running the code-mod with
Instead of adding
UNSAFE_
before each method, it fails with:It seems that the ES6 files are not readen correctly, am I missing something ?