mui / material-ui

Material UI: Comprehensive React component library that implements Google's Material Design. Free forever.
https://mui.com/material-ui/
MIT License
94.06k stars 32.32k forks source link

[core] Fix eslint-plugin-react-compiler issues #42564

Open aarongarciah opened 5 months ago

aarongarciah commented 5 months ago

Part of https://github.com/mui/material-ui/issues/42548

As part of adopting the official ESLint plugin for the React Compiler, we want to solve all of the reported issues.

Contributing

  1. Pick a file (or group of files belonging to the same group, ideally) in the list of existing issues below and let us know in the comments so we can assign them to you.
  2. Enable eslint-plugin-react-compiler in your local setup. The plugin is disabled by default, you won't see issues reported by it unless you enable it manually. To enable it, go to the root .eslintrc.js file and set ENABLE_REACT_COMPILER_PLUGIN to true. You should start seeing the issues reported right into your IDE if it's configured to report ESLint errors.
  3. Once the issue is solved, open a PR mentioning this issue so we can link it in the description and keep it up to date.

When in doubt if an issue can be solved or not (because of false positives or any other reason), explain why in your PR so we can discuss if the ESLint should be silenced in that case.

Issues to fix

Here's the list of files containing issues reported by eslint-plugin-react-compiler (as of June 6th 2024).

mui-material

Demos

Components / hooks (#43117, #43946)

mui-lab (#42880)

mui-styles (#43118)

mui-system (#42637)

mui-docs

mui-utils (#43051)

mui-joy (#42671)

Test (#42626)

mui-private-theming (#42619)

Documentation website components (#42566)

Search keywords: ESLint, React Compiler

binsmyth commented 5 months ago

Is it alright for me to work on this? do all the files require separate pull requests?

aarongarciah commented 5 months ago

@binsmyth help is more than welcome! No need for a PR for every file, but let’s keep PRs focused on the same group of files.

Let me know which group of files would you like to work on so I can assign them to you.

binsmyth commented 5 months ago

hey @aarongarciah I have started on Components/hooks group. So i would be happy to work on them. Thank you.

aarongarciah commented 5 months ago

@binsmyth I've assigned you the components/hooks group, thanks.

oliviertassinari commented 5 months ago

npx react-compiler-healthcheck@latest returns:

Successfully compiled 6098 out of 6419 components.
StrictMode usage found.
Found no usage of incompatible libraries.

(Lol, they have https://github.com/facebook/react/blob/main/compiler/packages/react-compiler-healthcheck/src/config.ts#L2)

Seeing the bugs present https://github.com/facebook/react/issues?q=is%3Aissue+is%3Aopen+%5BCompiler+Bug%5D, and playing a bit with it. It makes me feel like we could have a play focused on the long hall:

aarongarciah commented 5 months ago

@oliviertassinari yeah, we're not prioritizing this for now, just setting it up and making the some initial fixes as example so the community can work on it. Still good to play with it early if it helps us streamline the adoption of React Compiler.

sai6855 commented 5 months ago

@aarongarciah i'll pick up, mui-private-theming and test. these look small and quick

aarongarciah commented 5 months ago

@sai6855 great!

anuujj commented 5 months ago

Hi @aarongarciah, could you assign mui-joy group to me if no one else has picked it up?

aarongarciah commented 5 months ago

Hi @aarongarciah, could you assign mui-joy group to me if no one else has picked it up?

@anuujj done

jlewins commented 4 months ago

Hi @aarongarciah would you be able to assign the mui-styles group to me, if nobody else is working on it already? Thanks :)

aarongarciah commented 4 months ago

@jlewins done, thank you!

markliu2013 commented 4 months ago

@aarongarciah Can I take mui-system if nobody else is working on it?

sai6855 commented 4 months ago

@markliu2013 I'm afraid mui system is already done, can you take mui utils

markliu2013 commented 4 months ago

@sai6855 oh, I just saw merged, can you assign mui utils to me?

sai6855 commented 4 months ago

@markliu2013 go ahead on opening a PR, @aarongarciah will assign

aarongarciah commented 4 months ago

@markliu2013 done

markliu2013 commented 4 months ago

@aarongarciah It is my first contribution for open source project, can you help me to review?

binsmyth commented 3 months ago

@aarongarciah. Could you help me review my PR. Some CI are failing but i dont know how to fix it. Thanks.