Remove the {...props} pattern and props coupling, and create an eslint rule for that (#1733)

* Remove the {...props} pattern and props coupling, and create an eslint rule for that

Co-authored-by: v1b3m <vibenjamin6@gmail.com>
Co-authored-by: Thiago Nascimbeni <tnascimbeni@gmail.com>

* Add another test to the new rule

Co-authored-by: v1b3m <vibenjamin6@gmail.com>
Co-authored-by: Thiago Nascimbeni <tnascimbeni@gmail.com>

---------

Co-authored-by: v1b3m <vibenjamin6@gmail.com>
Co-authored-by: Thiago Nascimbeni <tnascimbeni@gmail.com>
This commit is contained in:
gitstart-twenty
2023-09-26 11:05:33 +02:00
committed by GitHub
co-authored by v1b3m Thiago Nascimbeni
parent cd20a437d8
commit ba86be2c5b
40 changed files with 205 additions and 0 deletions
@@ -160,6 +160,7 @@ export const SnackBar = ({
onMouseEnter={onMouseEnter}
onMouseLeave={onMouseLeave}
variant={variant}
// eslint-disable-next-line twenty/no-spread-props
{...rootProps}
>
<StyledProgressBarContainer>
@@ -80,6 +80,7 @@ export const SnackBarProvider = ({ children }: React.PropsWithChildren) => {
layout
>
<SnackBar
// eslint-disable-next-line twenty/no-spread-props
{...snackBar}
onClose={() => handleSnackBarClose(snackBar.id)}
/>