-
Notifications
You must be signed in to change notification settings - Fork 370
chore(deps): Use new JSX transform #11524
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Preview: https://patternfly-react-pr-11524.surge.sh A11y report: https://patternfly-react-pr-11524-a11y.surge.sh |
f43eba7
to
226e79d
Compare
Looking good to me, but it does seem the docs are still failing to build correctly. If there are any PRs related to this that need a review (e.g. in the docs repo), feel free to @ me for a review. |
Thanks, yeah that docs failure is unrelated to these changes... i recently made a change in a separate PR to fix an issue in which a11y violations were occurring on CI but CI was not failing. These a11y violations are fixed in another PR right now, so all pipelines are going to fail until that PR is merged in. |
d2654d5
to
38a0a66
Compare
What: Closes #9289
Introduces the new JSX transform which removes the need to import React in every file that contains JSX. This is a change required to add support for React 19.
Update 2/20/25:
This implementation covers almost all of patternfly-react... however in react-docs, the index.js and icons.js files still require a react import. This is due to it being required by the current iteration of the doc framework, much like the js files in that repo. The new doc framework that is in development will allow this to be addressed much more easily.
For now, adds a lint configuration to support the new transformation, including a rule to ban the default React import (
import React from 'react'
) in favor of named imports. The linter is set up to warn at this time, and I have filed a separate issue (#11553) to change all affected files (results of running the React codemods as well as any manual changes), as there will be hundreds of source files impacted.@jonkoops made the majority of the infrastructure changes, adding him here to take a look. Most of the changes will come in the follow-up issue above, want to push this separately. Also need buy-in from the team that we allow the react import for the two doc js files for now and wait for the new doc framework to be implemented to address.