Skip to content
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

Add the React Compiler linter #11139

Merged
merged 1 commit into from
Nov 8, 2024
Merged

Conversation

jonkoops
Copy link
Contributor

Adds the new React Compiler linter to the linting configuration and sets it to emit warnings where violations are detected. These warnings will need to be fixed and then turned into errors as a follow up (see #11138).

Closes #11137

@patternfly-build
Copy link
Contributor

patternfly-build commented Oct 26, 2024

Closes patternfly#11137

Signed-off-by: Jon Koops <jonkoops@gmail.com>
Copy link
Contributor

@dlabaj dlabaj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@@ -119,6 +121,7 @@ export default [
radix: ['error', 'as-needed'],
'react/prop-types': 0,
'react/display-name': 0,
'react-compiler/react-compiler': 'warn',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume at some point we want to change this to error out when we move to react 19? @tlabaj Do we need a story to revisit this in the future.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Already logged it, see #11138 😉

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The error value can be set once all warnings are fixed, no need to wait for React 19. It only notifies you of patterns that are incompatible with the React Compiler, but does not introduce anything incompatible.

@tlabaj tlabaj merged commit e80c120 into patternfly:main Nov 8, 2024
13 checks passed
@jonkoops jonkoops deleted the react-compiler-linter branch November 8, 2024 18:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add the React Compiler linter
5 participants