material-ui
material-ui copied to clipboard
[docs-infra] Fix React Compiler ESLint issues in website components
Part of https://github.com/mui/material-ui/issues/42564
Fixes or silences errors reported by eslint-plugin-react-compiler
in the website components.
The silenced occurrences are prepended with a comment because we use the --report-unused-disable-directives and we can't silence rules that are not configured, like the ones coming from eslint-plugin-react-compiler
, which is disabled by default as of today.
// TODO: uncomment once we enable eslint-plugin-react-compiler // eslint-disable-next-line react-compiler/react-compiler -- useEnhancedEffect uses useEffect under the hood
Apart from that, add a missing React key.
How to test
Make sure the parts of the docs that are affected by the changes work as expected. Half of the changes are just silencing the corresponding ESLint rule.