metamask-extension icon indicating copy to clipboard operation
metamask-extension copied to clipboard

chore: update typescript to ~v5.3.3

Open davidmurdoch opened this issue 1 year ago • 10 comments

This PR updates our typescript version to 5.3.3 (currently the latest version).

It also updates some eslint and babel dependencies as they older versions didn't work with the newer version of typescript.

There were some rule changes:

  1. jsdoc/check-line-alignment now requires consistent line wrap indentation. This is a large change that I don't want to make in this PR (it should be separate and the commit added to a .git-blame-ignore-revs file).
  2. Object<...> type syntax in jsdoc is not allowed; I fixes the breakages in this PR, as they were minimal
  3. JS files that were checked using typescript-eslint aren't anymore. It is no longer permitted to apply typescript-eslint to files that are not also included in our tsconfig.json, and since our JS does not pass the typechecker I had to remove typescript-eslint from some JS rules.
  4. We previously had a rule jest/no-large-snapshots, but it wasn't actually enforced. This eslint package updates fix the rule, but we don't even come close to passing it, so I turned it off
  5. ui/store/actions.ts was beyond repair. I've enabled @ts-nocheck for the entire file. I do NOT volunteer as tribute to fix this. :-)

I have also simplified and updated our tsconfig.json to remove redundant options and align it with the features and files that we use. I've also added compilation caching, which makes successive typescript linting much faster. See comments in tsconfig.json.

I've merged our .prettierignore and eslint ignore lists together, as the two lists seem to have diverged over time. Our eslintrc.js now imports .prettierignore so they won't diverge again in the future.

Our eslint config now fully parses our tsconfig.json and only applies typescript-eslint to .ts and .tsx files that our tsconfig.json lists (the .js files don't typecheck sucessfully, so they aren't included).

davidmurdoch avatar Jan 12 '24 21:01 davidmurdoch

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

github-actions[bot] avatar Jan 12 '24 21:01 github-actions[bot]

👍 Dependency issues cleared. Learn more about Socket for GitHub ↗︎

This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored.

View full report↗︎

socket-security[bot] avatar Jan 12 '24 22:01 socket-security[bot]

Builds ready [076fb81]
Page Load Metrics (755 ± 20 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint8014191126
domContentLoaded9451673
load7028527554120
domInteractive9451673
Bundle size diffs [🚀 Bundle size reduced!]
  • background: 0 Bytes (0.00%)
  • ui: 58 Bytes (0.00%)
  • common: -72 Bytes (-0.00%)

metamaskbot avatar Feb 09 '24 19:02 metamaskbot

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (9c59da5) 68.54% compared to head (18f4e2a) 68.53%.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #22530      +/-   ##
===========================================
- Coverage    68.54%   68.53%   -0.01%     
===========================================
  Files         1088     1088              
  Lines        42908    42893      -15     
  Branches     11414    11414              
===========================================
- Hits         29410    29396      -14     
+ Misses       13498    13497       -1     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Feb 10 '24 01:02 codecov[bot]

Builds ready [f179cdb]
Page Load Metrics (946 ± 25 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint1242441803115
domContentLoaded1098372612
load88011079465325
domInteractive1098372612
Bundle size diffs [🚀 Bundle size reduced!]
  • background: 0 Bytes (0.00%)
  • ui: 58 Bytes (0.00%)
  • common: -72 Bytes (-0.00%)

metamaskbot avatar Feb 10 '24 01:02 metamaskbot

Builds ready [18a69f8]
Page Load Metrics (1059 ± 96 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint1184292258340
domContentLoaded1297493014
load7941498105920096
domInteractive1297493014
Bundle size diffs [🚀 Bundle size reduced!]
  • background: 0 Bytes (0.00%)
  • ui: 58 Bytes (0.00%)
  • common: -72 Bytes (-0.00%)

metamaskbot avatar Feb 14 '24 00:02 metamaskbot

Builds ready [18a69f8]
Page Load Metrics (949 ± 25 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint151225190178
domContentLoaded970372412
load89610899495225
domInteractive970372412
Bundle size diffs [🚀 Bundle size reduced!]
  • background: 0 Bytes (0.00%)
  • ui: 58 Bytes (0.00%)
  • common: -72 Bytes (-0.00%)

metamaskbot avatar Feb 14 '24 01:02 metamaskbot

Should we add the package [email protected] as part of this PR?

HowardBraham avatar Feb 14 '24 03:02 HowardBraham

Builds ready [d840987]
Page Load Metrics (1111 ± 42 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint1343522175024
domContentLoaded983332311
load987132911118842
domInteractive983332311
Bundle size diffs [🚀 Bundle size reduced!]
  • background: 0 Bytes (0.00%)
  • ui: 58 Bytes (0.00%)
  • common: -72 Bytes (-0.00%)

metamaskbot avatar Feb 14 '24 21:02 metamaskbot

Builds ready [18f4e2a]
Page Load Metrics (1073 ± 72 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint984982067637
domContentLoaded896322512
load8721489107315172
domInteractive896322512
Bundle size diffs [🚀 Bundle size reduced!]
  • background: 0 Bytes (0.00%)
  • ui: 58 Bytes (0.00%)
  • common: -72 Bytes (-0.00%)

metamaskbot avatar Feb 15 '24 07:02 metamaskbot

Should we add the package [email protected] as part of this PR?

@HowardBraham, the tsx package isn't used. The webpack PR I'm working on does add it though.

davidmurdoch avatar Feb 15 '24 15:02 davidmurdoch