0.1.4 • Published 7 months ago

instantsearch-codemods v0.1.4

Weekly downloads
-
License
MIT
Repository
github
Last release
7 months ago

Codemods

These codemods (code transformers) can be ran with jscodeshift.

rish-to-ris

This will replace all imports from react-instantsearch-hooks to their react-instantsearch equivalent.

npx @codeshift/cli --packages 'instantsearch-codemods#rish-to-ris' <path>

ris-v6-to-v7

This will:

  • Replace react-instantsearch-dom imports to react-instantsearch
  • Replace prop names to their new equivalent
  • Replace translations keys to their new equivalent if they are defined inline, otherwise it will add a TODO comment
  • Add some TODO comments to help you migrate
npx @codeshift/cli --packages 'instantsearch-codemods#ris-v6-to-v7' <path>

Notes

If you are using Prettier or ESLint, make sure to run its autofixing after this transformation, since code can be formatted differently after it has been transformed. For example, in our repository, the Prettier command would be:

yarn prettier --write '{examples,stories,.storybook}/**/*.{js,jsx,ts,tsx}'
0.1.4

7 months ago

0.1.3

8 months ago

0.1.2

9 months ago

0.1.1

9 months ago

0.1.0

9 months ago

1.0.0

10 months ago