sablier-labs / v1-safe-app

Safe App for interacting with the Sablier protocol
https://sablier-v1-safe-app.vercel.app
GNU General Public License v3.0
19 stars 7 forks source link

eslint@typescript-eslint/no-empty-interface #75

Closed PaulRBerg closed 3 years ago

PaulRBerg commented 3 years ago

Do we really need the "ComponentNameToClassKey" interface here?

https://github.com/TomAFrench/sablier-safe-app/blob/0137fa632cf39b481bb9ae9f0bdd2a9cb535a34d/src/types/overrides-mui.d.ts#L7-L9

ESLint is throwing the following error:

An interface declaring no members is equivalent to its supertype. eslint@typescript-eslint/no-empty-interface

PaulRBerg commented 3 years ago

Yes, we need it, otherwise the build fails with the following error:

TypeScript error in /Users/paulrberg/projects/sablier/columbus/gnosis-safe-app/src/theme/datetimepicker.ts(19,5):
Argument of type '{ palette: { primary: { light: string; main: string; dark: string; }; secondary: { light: string; main: string; dark: string; }; }; overrides: { MuiPickersToolbar: { toolbar: { backgroundColor: string; }; }; MuiPickerDTTabs: { ...; }; }; }' is not assignable to parameter of type 'ThemeOptions'.
  Types of property 'overrides' are incompatible.
    Type '{ MuiPickersToolbar: { toolbar: { backgroundColor: string; }; }; MuiPickerDTTabs: { tabs: { backgroundColor: string; }; indicator: { backgroundColor: string; }; }; }' is not assignable to type 'Overrides'.
      Object literal may only specify known properties, and 'MuiPickersToolbar' does not exist in type 'Overrides'.  TS2345

    17 |   },
    18 |   overrides: {
  > 19 |     MuiPickersToolbar: {
       |     ^
    20 |       toolbar: {
    21 |         backgroundColor: primaryLight,
    22 |       },

I added a disable pragma in c06813d to prevent eslint from throwing warnings anymore.