diff --git a/.eslintrc.js b/.eslintrc.js index 7d7b22330463b7..94cd3c37d5fae6 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -363,6 +363,7 @@ module.exports = { 'react/require-default-props': 'off', 'react/state-in-constructor': 'off', 'react/static-property-placement': 'off', + 'react/function-component-definition': 'off', }, }, { diff --git a/packages/mui-styles/src/makeStyles/makeStyles.spec.tsx b/packages/mui-styles/src/makeStyles/makeStyles.spec.tsx index d71a5c298c6129..b3431adc42f4cd 100644 --- a/packages/mui-styles/src/makeStyles/makeStyles.spec.tsx +++ b/packages/mui-styles/src/makeStyles/makeStyles.spec.tsx @@ -21,7 +21,6 @@ import { createStyles, makeStyles } from '@mui/styles'; message: string; } - // eslint-disable-next-line react/function-component-definition const MyComponent = (props: MyComponentProps) => { const { color, message } = props; // @ts-expect-error Expected 1 argument, but got 0 diff --git a/packages/mui-styles/test/styles.spec.tsx b/packages/mui-styles/test/styles.spec.tsx index e6e0b64957eef4..9b3a4e0c059a0b 100644 --- a/packages/mui-styles/test/styles.spec.tsx +++ b/packages/mui-styles/test/styles.spec.tsx @@ -255,7 +255,6 @@ withStyles((theme) => }, }); - // eslint-disable-next-line react/function-component-definition const Component = (props: ComponentProps) => { return
Hello {props.caption}
; }; @@ -370,10 +369,8 @@ withStyles((theme) => const StyledMyButton = withStyles(styles)(MyButton); - // eslint-disable-next-line react/function-component-definition const CorrectUsage = () => ; // @ts-expect-error Property 'nonDefaulted' is missing in type '{}' - // eslint-disable-next-line react/function-component-definition const MissingPropUsage = () => ; }