matrix-js-sdk icon indicating copy to clipboard operation
matrix-js-sdk copied to clipboard

Enable all `no-unsafe-*` eslints

Open ShadowJonathan opened this issue 4 years ago • 2 comments

  • https://typescript-eslint.io/rules/no-unsafe-argument
  • https://typescript-eslint.io/rules/no-unsafe-assignment
  • https://typescript-eslint.io/rules/no-unsafe-call
  • https://typescript-eslint.io/rules/no-unsafe-member-access
  • https://typescript-eslint.io/rules/no-unsafe-return

This'll make typescript stricter on any usage, disallowing it pretty much anywhere.

Most legitimate usages can be replaced with unknown.

Related: https://github.com/matrix-org/matrix-js-sdk/issues/2115

ShadowJonathan avatar Jan 23 '22 15:01 ShadowJonathan

Why?

turt2live avatar Jan 24 '22 18:01 turt2live

More you add typescript restriction more stronger your library will be. And with any strong typescript project like Angular, you have to provide maximum of definition to enforce good practice and reduce internal and compilation errors #2310

FazioNico avatar Apr 20 '22 16:04 FazioNico