├── .eslintrc.js ├── .github ├── ISSUE_TEMPLATE │ ├── bug_report.md │ ├── config.yml │ ├── feature_request.md │ └── pull_request_template.md └── workflows │ └── main.yml ├── .gitignore ├── .husky ├── .gitignore └── pre-commit ├── .prettierignore ├── .prettierrc.json ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── LICENCE.md ├── README.md ├── bin ├── cli.ts └── hookform-codemod.ts ├── jest.config.js ├── package.json ├── transforms ├── __testfixtures__ │ └── v7 │ │ ├── move-errors-to-formState │ │ ├── already-migrated-context.input.js │ │ ├── already-migrated-context.output.js │ │ ├── already-migrated.input.js │ │ ├── already-migrated.output.js │ │ ├── function-component-context.input.js │ │ ├── function-component-context.output.js │ │ ├── function-component.input.js │ │ ├── function-component.output.js │ │ ├── with-custom-errors-context.input.js │ │ ├── with-custom-errors-context.output.js │ │ ├── with-custom-errors.input.js │ │ ├── with-custom-errors.output.js │ │ ├── with-formState-1-context.input.js │ │ ├── with-formState-1-context.output.js │ │ ├── with-formState-1.input.js │ │ ├── with-formState-1.output.js │ │ ├── with-formState-2-context.input.js │ │ ├── with-formState-2-context.output.js │ │ ├── with-formState-2.input.js │ │ ├── with-formState-2.output.js │ │ ├── with-formState-3-context.input.js │ │ ├── with-formState-3-context.output.js │ │ ├── with-formState-3.input.js │ │ └── with-formState-3.output.js │ │ └── update-register │ │ ├── already-migrated-context.input.js │ │ ├── already-migrated-context.output.js │ │ ├── already-migrated.input.js │ │ ├── already-migrated.output.js │ │ ├── custom-register-context.input.js │ │ ├── custom-register-context.output.js │ │ ├── custom-register.input.js │ │ ├── custom-register.output.js │ │ ├── function-component-2-context.input.js │ │ ├── function-component-2-context.output.js │ │ ├── function-component-2.input.js │ │ ├── function-component-2.output.js │ │ ├── function-component-context.input.js │ │ ├── function-component-context.output.js │ │ ├── function-component.input.js │ │ ├── function-component.output.js │ │ ├── function-components-context.input.js │ │ ├── function-components-context.output.js │ │ ├── function-components.input.js │ │ ├── function-components.output.js │ │ ├── no-transform-context.input.js │ │ ├── no-transform-context.output.js │ │ ├── no-transform.input.js │ │ ├── no-transform.output.js │ │ ├── template-string-register.input.js │ │ └── template-string-register.output.js ├── __tests__ │ └── v7 │ │ ├── move-errors-to-formState.test.ts │ │ └── update-register.test.ts └── v7 │ ├── move-errors-to-formState.ts │ └── update-register.ts ├── tsconfig.json ├── utils ├── defineTest.ts ├── getUseFormDeclarators.ts └── keys.ts └── yarn.lock /.eslintrc.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-hook-form/codemod/HEAD/.eslintrc.js -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-hook-form/codemod/HEAD/.github/ISSUE_TEMPLATE/bug_report.md -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-hook-form/codemod/HEAD/.github/ISSUE_TEMPLATE/config.yml -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-hook-form/codemod/HEAD/.github/ISSUE_TEMPLATE/feature_request.md -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/pull_request_template.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-hook-form/codemod/HEAD/.github/ISSUE_TEMPLATE/pull_request_template.md -------------------------------------------------------------------------------- /.github/workflows/main.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-hook-form/codemod/HEAD/.github/workflows/main.yml -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-hook-form/codemod/HEAD/.gitignore -------------------------------------------------------------------------------- /.husky/.gitignore: -------------------------------------------------------------------------------- 1 | _ -------------------------------------------------------------------------------- /.husky/pre-commit: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-hook-form/codemod/HEAD/.husky/pre-commit -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | transforms/__testfixtures__ -------------------------------------------------------------------------------- /.prettierrc.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-hook-form/codemod/HEAD/.prettierrc.json -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-hook-form/codemod/HEAD/CODE_OF_CONDUCT.md -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-hook-form/codemod/HEAD/CONTRIBUTING.md -------------------------------------------------------------------------------- /LICENCE.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-hook-form/codemod/HEAD/LICENCE.md -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-hook-form/codemod/HEAD/README.md -------------------------------------------------------------------------------- /bin/cli.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-hook-form/codemod/HEAD/bin/cli.ts -------------------------------------------------------------------------------- /bin/hookform-codemod.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-hook-form/codemod/HEAD/bin/hookform-codemod.ts -------------------------------------------------------------------------------- /jest.config.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-hook-form/codemod/HEAD/jest.config.js -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-hook-form/codemod/HEAD/package.json -------------------------------------------------------------------------------- /transforms/__testfixtures__/v7/move-errors-to-formState/already-migrated-context.input.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-hook-form/codemod/HEAD/transforms/__testfixtures__/v7/move-errors-to-formState/already-migrated-context.input.js -------------------------------------------------------------------------------- /transforms/__testfixtures__/v7/move-errors-to-formState/already-migrated-context.output.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-hook-form/codemod/HEAD/transforms/__testfixtures__/v7/move-errors-to-formState/already-migrated-context.output.js -------------------------------------------------------------------------------- /transforms/__testfixtures__/v7/move-errors-to-formState/already-migrated.input.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-hook-form/codemod/HEAD/transforms/__testfixtures__/v7/move-errors-to-formState/already-migrated.input.js -------------------------------------------------------------------------------- /transforms/__testfixtures__/v7/move-errors-to-formState/already-migrated.output.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-hook-form/codemod/HEAD/transforms/__testfixtures__/v7/move-errors-to-formState/already-migrated.output.js -------------------------------------------------------------------------------- /transforms/__testfixtures__/v7/move-errors-to-formState/function-component-context.input.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-hook-form/codemod/HEAD/transforms/__testfixtures__/v7/move-errors-to-formState/function-component-context.input.js -------------------------------------------------------------------------------- /transforms/__testfixtures__/v7/move-errors-to-formState/function-component-context.output.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-hook-form/codemod/HEAD/transforms/__testfixtures__/v7/move-errors-to-formState/function-component-context.output.js -------------------------------------------------------------------------------- /transforms/__testfixtures__/v7/move-errors-to-formState/function-component.input.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-hook-form/codemod/HEAD/transforms/__testfixtures__/v7/move-errors-to-formState/function-component.input.js -------------------------------------------------------------------------------- /transforms/__testfixtures__/v7/move-errors-to-formState/function-component.output.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-hook-form/codemod/HEAD/transforms/__testfixtures__/v7/move-errors-to-formState/function-component.output.js -------------------------------------------------------------------------------- /transforms/__testfixtures__/v7/move-errors-to-formState/with-custom-errors-context.input.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-hook-form/codemod/HEAD/transforms/__testfixtures__/v7/move-errors-to-formState/with-custom-errors-context.input.js -------------------------------------------------------------------------------- /transforms/__testfixtures__/v7/move-errors-to-formState/with-custom-errors-context.output.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-hook-form/codemod/HEAD/transforms/__testfixtures__/v7/move-errors-to-formState/with-custom-errors-context.output.js -------------------------------------------------------------------------------- /transforms/__testfixtures__/v7/move-errors-to-formState/with-custom-errors.input.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-hook-form/codemod/HEAD/transforms/__testfixtures__/v7/move-errors-to-formState/with-custom-errors.input.js -------------------------------------------------------------------------------- /transforms/__testfixtures__/v7/move-errors-to-formState/with-custom-errors.output.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-hook-form/codemod/HEAD/transforms/__testfixtures__/v7/move-errors-to-formState/with-custom-errors.output.js -------------------------------------------------------------------------------- /transforms/__testfixtures__/v7/move-errors-to-formState/with-formState-1-context.input.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-hook-form/codemod/HEAD/transforms/__testfixtures__/v7/move-errors-to-formState/with-formState-1-context.input.js -------------------------------------------------------------------------------- /transforms/__testfixtures__/v7/move-errors-to-formState/with-formState-1-context.output.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-hook-form/codemod/HEAD/transforms/__testfixtures__/v7/move-errors-to-formState/with-formState-1-context.output.js -------------------------------------------------------------------------------- /transforms/__testfixtures__/v7/move-errors-to-formState/with-formState-1.input.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-hook-form/codemod/HEAD/transforms/__testfixtures__/v7/move-errors-to-formState/with-formState-1.input.js -------------------------------------------------------------------------------- /transforms/__testfixtures__/v7/move-errors-to-formState/with-formState-1.output.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-hook-form/codemod/HEAD/transforms/__testfixtures__/v7/move-errors-to-formState/with-formState-1.output.js -------------------------------------------------------------------------------- /transforms/__testfixtures__/v7/move-errors-to-formState/with-formState-2-context.input.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-hook-form/codemod/HEAD/transforms/__testfixtures__/v7/move-errors-to-formState/with-formState-2-context.input.js -------------------------------------------------------------------------------- /transforms/__testfixtures__/v7/move-errors-to-formState/with-formState-2-context.output.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-hook-form/codemod/HEAD/transforms/__testfixtures__/v7/move-errors-to-formState/with-formState-2-context.output.js -------------------------------------------------------------------------------- /transforms/__testfixtures__/v7/move-errors-to-formState/with-formState-2.input.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-hook-form/codemod/HEAD/transforms/__testfixtures__/v7/move-errors-to-formState/with-formState-2.input.js -------------------------------------------------------------------------------- /transforms/__testfixtures__/v7/move-errors-to-formState/with-formState-2.output.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-hook-form/codemod/HEAD/transforms/__testfixtures__/v7/move-errors-to-formState/with-formState-2.output.js -------------------------------------------------------------------------------- /transforms/__testfixtures__/v7/move-errors-to-formState/with-formState-3-context.input.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-hook-form/codemod/HEAD/transforms/__testfixtures__/v7/move-errors-to-formState/with-formState-3-context.input.js -------------------------------------------------------------------------------- /transforms/__testfixtures__/v7/move-errors-to-formState/with-formState-3-context.output.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-hook-form/codemod/HEAD/transforms/__testfixtures__/v7/move-errors-to-formState/with-formState-3-context.output.js -------------------------------------------------------------------------------- /transforms/__testfixtures__/v7/move-errors-to-formState/with-formState-3.input.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-hook-form/codemod/HEAD/transforms/__testfixtures__/v7/move-errors-to-formState/with-formState-3.input.js -------------------------------------------------------------------------------- /transforms/__testfixtures__/v7/move-errors-to-formState/with-formState-3.output.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-hook-form/codemod/HEAD/transforms/__testfixtures__/v7/move-errors-to-formState/with-formState-3.output.js -------------------------------------------------------------------------------- /transforms/__testfixtures__/v7/update-register/already-migrated-context.input.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-hook-form/codemod/HEAD/transforms/__testfixtures__/v7/update-register/already-migrated-context.input.js -------------------------------------------------------------------------------- /transforms/__testfixtures__/v7/update-register/already-migrated-context.output.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-hook-form/codemod/HEAD/transforms/__testfixtures__/v7/update-register/already-migrated-context.output.js -------------------------------------------------------------------------------- /transforms/__testfixtures__/v7/update-register/already-migrated.input.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-hook-form/codemod/HEAD/transforms/__testfixtures__/v7/update-register/already-migrated.input.js -------------------------------------------------------------------------------- /transforms/__testfixtures__/v7/update-register/already-migrated.output.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-hook-form/codemod/HEAD/transforms/__testfixtures__/v7/update-register/already-migrated.output.js -------------------------------------------------------------------------------- /transforms/__testfixtures__/v7/update-register/custom-register-context.input.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-hook-form/codemod/HEAD/transforms/__testfixtures__/v7/update-register/custom-register-context.input.js -------------------------------------------------------------------------------- /transforms/__testfixtures__/v7/update-register/custom-register-context.output.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-hook-form/codemod/HEAD/transforms/__testfixtures__/v7/update-register/custom-register-context.output.js -------------------------------------------------------------------------------- /transforms/__testfixtures__/v7/update-register/custom-register.input.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-hook-form/codemod/HEAD/transforms/__testfixtures__/v7/update-register/custom-register.input.js -------------------------------------------------------------------------------- /transforms/__testfixtures__/v7/update-register/custom-register.output.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-hook-form/codemod/HEAD/transforms/__testfixtures__/v7/update-register/custom-register.output.js -------------------------------------------------------------------------------- /transforms/__testfixtures__/v7/update-register/function-component-2-context.input.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-hook-form/codemod/HEAD/transforms/__testfixtures__/v7/update-register/function-component-2-context.input.js -------------------------------------------------------------------------------- /transforms/__testfixtures__/v7/update-register/function-component-2-context.output.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-hook-form/codemod/HEAD/transforms/__testfixtures__/v7/update-register/function-component-2-context.output.js -------------------------------------------------------------------------------- /transforms/__testfixtures__/v7/update-register/function-component-2.input.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-hook-form/codemod/HEAD/transforms/__testfixtures__/v7/update-register/function-component-2.input.js -------------------------------------------------------------------------------- /transforms/__testfixtures__/v7/update-register/function-component-2.output.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-hook-form/codemod/HEAD/transforms/__testfixtures__/v7/update-register/function-component-2.output.js -------------------------------------------------------------------------------- /transforms/__testfixtures__/v7/update-register/function-component-context.input.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-hook-form/codemod/HEAD/transforms/__testfixtures__/v7/update-register/function-component-context.input.js -------------------------------------------------------------------------------- /transforms/__testfixtures__/v7/update-register/function-component-context.output.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-hook-form/codemod/HEAD/transforms/__testfixtures__/v7/update-register/function-component-context.output.js -------------------------------------------------------------------------------- /transforms/__testfixtures__/v7/update-register/function-component.input.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-hook-form/codemod/HEAD/transforms/__testfixtures__/v7/update-register/function-component.input.js -------------------------------------------------------------------------------- /transforms/__testfixtures__/v7/update-register/function-component.output.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-hook-form/codemod/HEAD/transforms/__testfixtures__/v7/update-register/function-component.output.js -------------------------------------------------------------------------------- /transforms/__testfixtures__/v7/update-register/function-components-context.input.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-hook-form/codemod/HEAD/transforms/__testfixtures__/v7/update-register/function-components-context.input.js -------------------------------------------------------------------------------- /transforms/__testfixtures__/v7/update-register/function-components-context.output.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-hook-form/codemod/HEAD/transforms/__testfixtures__/v7/update-register/function-components-context.output.js -------------------------------------------------------------------------------- /transforms/__testfixtures__/v7/update-register/function-components.input.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-hook-form/codemod/HEAD/transforms/__testfixtures__/v7/update-register/function-components.input.js -------------------------------------------------------------------------------- /transforms/__testfixtures__/v7/update-register/function-components.output.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-hook-form/codemod/HEAD/transforms/__testfixtures__/v7/update-register/function-components.output.js -------------------------------------------------------------------------------- /transforms/__testfixtures__/v7/update-register/no-transform-context.input.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-hook-form/codemod/HEAD/transforms/__testfixtures__/v7/update-register/no-transform-context.input.js -------------------------------------------------------------------------------- /transforms/__testfixtures__/v7/update-register/no-transform-context.output.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-hook-form/codemod/HEAD/transforms/__testfixtures__/v7/update-register/no-transform-context.output.js -------------------------------------------------------------------------------- /transforms/__testfixtures__/v7/update-register/no-transform.input.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-hook-form/codemod/HEAD/transforms/__testfixtures__/v7/update-register/no-transform.input.js -------------------------------------------------------------------------------- /transforms/__testfixtures__/v7/update-register/no-transform.output.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-hook-form/codemod/HEAD/transforms/__testfixtures__/v7/update-register/no-transform.output.js -------------------------------------------------------------------------------- /transforms/__testfixtures__/v7/update-register/template-string-register.input.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-hook-form/codemod/HEAD/transforms/__testfixtures__/v7/update-register/template-string-register.input.js -------------------------------------------------------------------------------- /transforms/__testfixtures__/v7/update-register/template-string-register.output.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-hook-form/codemod/HEAD/transforms/__testfixtures__/v7/update-register/template-string-register.output.js -------------------------------------------------------------------------------- /transforms/__tests__/v7/move-errors-to-formState.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-hook-form/codemod/HEAD/transforms/__tests__/v7/move-errors-to-formState.test.ts -------------------------------------------------------------------------------- /transforms/__tests__/v7/update-register.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-hook-form/codemod/HEAD/transforms/__tests__/v7/update-register.test.ts -------------------------------------------------------------------------------- /transforms/v7/move-errors-to-formState.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-hook-form/codemod/HEAD/transforms/v7/move-errors-to-formState.ts -------------------------------------------------------------------------------- /transforms/v7/update-register.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-hook-form/codemod/HEAD/transforms/v7/update-register.ts -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-hook-form/codemod/HEAD/tsconfig.json -------------------------------------------------------------------------------- /utils/defineTest.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-hook-form/codemod/HEAD/utils/defineTest.ts -------------------------------------------------------------------------------- /utils/getUseFormDeclarators.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-hook-form/codemod/HEAD/utils/getUseFormDeclarators.ts -------------------------------------------------------------------------------- /utils/keys.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-hook-form/codemod/HEAD/utils/keys.ts -------------------------------------------------------------------------------- /yarn.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-hook-form/codemod/HEAD/yarn.lock --------------------------------------------------------------------------------