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

feat: add eslint-plugin-react-compiler #227

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ecreeth
Copy link
Contributor

@ecreeth ecreeth commented Oct 24, 2024

This PR fixes #216

Currently, we're doing a lot of nativeProps.PROP = VALUE; assignments and the compiler doesn't like at all. It throws:

Mutating a value returned from a function whose return value should not be mutated react-compiler/react-compiler

I fixed it by doing shallow copies, but I don't know if this is the right approach. If this is ok I can continue doing the rest.

Tried to dig dive a little and found this: facebook/react#29093 (comment)

"react-hooks/exhaustive-deps": "error",

// react-compiler
"react-compiler/react-compiler": "warn"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

warn until all fixes has been applied.

@ecreeth
Copy link
Contributor Author

ecreeth commented Oct 25, 2024

The benchmarks/{size, perf} jobs are failing because of this:
"In public repositories this action does not work in pull_request workflows when triggered by forks"

See more in peter-evans/create-or-update-comment#76 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add the React Compiler eslint plugin
2 participants