MetaMask / metamask-mobile

Mobile web browser providing access to websites that use the Ethereum blockchain
https://metamask.io
Other
2.12k stars 1.1k forks source link

☂️ Fix remaining TS/TSX static type errors #5993

Open leotm opened 1 year ago

leotm commented 1 year ago

Describe the issue Increase ability to catch bugs at compile time. I.e. identify and resolve faster.

This is a follow-up to

which enables TSC to emit our remaining TS/TSX type errors to fix ~570ish errors in ~90ish files, tracked in our internal google sheet

once complete at 0 errors (and 0 warnings ideally) we can re-enable TSC in our pre-commit hooks and CI

then later upgrade to TypeScript v5 once our MM shared ESLint config is on v5

a good long-term follow-up would be

Screenshots

In issues above ^

To Reproduce

yarn tsc

Expected behavior

0 errors 0 warnings (ideally)

Smartphone (please complete the following information):

N/A


to be added after bug submission by internal support / PM Severity

hesterbruikman commented 1 year ago

@leotm @Cal-L

Added a note to give context to this work and make it easier to discuss relevance:

"Increase ability to catch bugs at compile time. I.e. identify and resolve faster."

Any other reasons for why this work should be prioritised? Dependencies with libraries?

leotm commented 1 year ago

Any other reasons for why this work should be prioritised?

we could add correct types make it easier (and more welcoming) working on our codebase as well as getting VS Code clean/free of type errors (linted in red @sethkfman raised originally)

leotm commented 1 year ago

Dependencies with libraries?

the main one to note is https://github.com/MetaMask/metamask-mobile/issues/5984 depends on https://github.com/MetaMask/eslint-config/releases/tag/v12.1.0 which was released last month so no longer blocking the TS v5 upgrade