You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We currently use @ts-ignore in a couple of places around the UI. In cases where it's really needed to deactivate the typed compiler (what this command do), we should favor @ts-expect-error above @ts-ignore. They both do pretty similar things (disabling the typed compiler for that place), but @ts-expect-error will actually fail, if the next line wouldn't throw a compiler error. The danger of @ts-ignore is that they might often be forgotten and left in places even if the underlying issue that throw the type error is actually fixed (e.g. here an example), but still keep the typed compiler disabled in those places and therefore decrease code safteyness in general.
To also prevent usage of @ts-ignore we should change the eslint config for the corresponding rule to:
We currently use
@ts-ignore
in a couple of places around the UI. In cases where it's really needed to deactivate the typed compiler (what this command do), we should favor@ts-expect-error
above@ts-ignore
. They both do pretty similar things (disabling the typed compiler for that place), but@ts-expect-error
will actually fail, if the next line wouldn't throw a compiler error. The danger of@ts-ignore
is that they might often be forgotten and left in places even if the underlying issue that throw the type error is actually fixed (e.g. here an example), but still keep the typed compiler disabled in those places and therefore decrease code safteyness in general.To also prevent usage of
@ts-ignore
we should change the eslint config for the corresponding rule to:Thus
@ts-ignore
would be forbidden completely and@ts-expect-error
allowed only with a comment.Priority: low
The text was updated successfully, but these errors were encountered: