Skip to content

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
Collaborator

patternfly-build commented Oct 26, 2024

@jonkoops jonkoops force-pushed the react-compiler-linter branch from 4bcc4f9 to 22d4376 Compare November 8, 2024 15:33
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.

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
@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