Skip to content

Commit

Permalink
Update migration doc
Browse files Browse the repository at this point in the history
  • Loading branch information
lachlancollins committed Apr 25, 2024
1 parent 788728e commit 32477e8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/framework/react/guides/migrating-to-v5.md
Expand Up @@ -91,7 +91,7 @@ If you want to run it against `.js` or `.jsx` files, please use the command belo
```
npx jscodeshift@latest ./path/to/src/ \
--extensions=js,jsx \
--transform=./node_modules/@tanstack/react-query/build/codemods/src/v5/remove-overloads/remove-overloads.js
--transform=./node_modules/@tanstack/react-query/build/codemods/src/v5/remove-overloads/remove-overloads.cjs
```

If you want to run it against `.ts` or `.tsx` files, please use the command below:
Expand All @@ -100,7 +100,7 @@ If you want to run it against `.ts` or `.tsx` files, please use the command belo
npx jscodeshift@latest ./path/to/src/ \
--extensions=ts,tsx \
--parser=tsx \
--transform=./node_modules/@tanstack/react-query/build/codemods/src/v5/remove-overloads/remove-overloads.js
--transform=./node_modules/@tanstack/react-query/build/codemods/src/v5/remove-overloads/remove-overloads.cjs
```

Please note in the case of `TypeScript` you need to use `tsx` as the parser; otherwise, the codemod won't be applied properly!
Expand Down

0 comments on commit 32477e8

Please sign in to comment.