-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
Thanks a lot for creating this! I was testing out the codemod on my NodeJS files and it works great. However, it errors out when I try it on React components that have JSX. I get this error:
ERR ./components/storefront/CalendarTimeButton.js Transformation error (Unexpected token, expected "," (26:23))
SyntaxError: Unexpected token, expected "," (26:23)
at Object._raise (/Users/tilo/.npm/_npx/26609/lib/node_modules/moment-dayjs-codemod/node_modules/@babel/parser/src/parser/error.js:134:45)
at Object.raiseWithData (/Users/tilo/.npm/_npx/26609/lib/node_modules/moment-dayjs-codemod/node_modules/@babel/parser/src/parser/error.js:129:17)
at Object.raise (/Users/tilo/.npm/_npx/26609/lib/node_modules/moment-dayjs-codemod/node_modules/@babel/parser/src/parser/error.js:78:17)
at Object.unexpected (/Users/tilo/.npm/_npx/26609/lib/node_modules/moment-dayjs-codemod/node_modules/@babel/parser/src/parser/util.js:179:16)
at Object.expect (/Users/tilo/.npm/_npx/26609/lib/node_modules/moment-dayjs-codemod/node_modules/@babel/parser/src/parser/util.js:144:28)
at Object.tsParseDelimitedListWorker (/Users/tilo/.npm/_npx/26609/lib/node_modules/moment-dayjs-codemod/node_modules/@babel/parser/src/plugins/typescript/index.js:385:16)
at Object.tsParseDelimitedList (/Users/tilo/.npm/_npx/26609/lib/node_modules/moment-dayjs-codemod/node_modules/@babel/parser/src/plugins/typescript/index.js:345:14)
at Object.tsParseBracketedList (/Users/tilo/.npm/_npx/26609/lib/node_modules/moment-dayjs-codemod/node_modules/@babel/parser/src/plugins/typescript/index.js:407:27)
at Object.tsParseTypeParameters (/Users/tilo/.npm/_npx/26609/lib/node_modules/moment-dayjs-codemod/node_modules/@babel/parser/src/plugins/typescript/index.js:508:26)
at /Users/tilo/.npm/_npx/26609/lib/node_modules/moment-dayjs-codemod/node_modules/@babel/parser/src/plugins/typescript/index.js:2748:31
My component compiles fine, so I'm not sure where this syntax error is coming from. The stack trace seems to suggest its within the jscodeshift parser. Was wondering if you had experience with this and could point me in a direction. Thanks! π
rakleed
Metadata
Metadata
Assignees
Labels
No labels