[SG-33302] Upgrade all client packages to use the latest version of the JSX transform
Created by: gitstart-sourcegraph
Description
-
Upgrade to the latest version of the JSX transform in all packages with following steps:
- Update
babel.config.js
to use new@babel/preset-react
runtime - Update all
tsconfig.json
to use"jsx": "react-jsx"
- Execute:
npx react-codemod update-react-imports ./client --parser=tsx
- Fix lint/format errors
- Update
-
Note: React codemod adds
import * as React from 'react'
in files which are using React APIs viaReact.*
form, it requires some extra works to convertReact.react_api
toimport { react_api } from 'react'
(already did that forclient/branded
package). it would be great if we have our own codemod to do that transform
Test plan
Make sure all checks are passed in CI
Refs
App preview:
Check out the client app preview documentation to learn more.