MetaMask / MetaMask/core

[utils] Integrate "Are the Types Wrong", and fix issues

Open
#10,203 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
413
Forks
308
Avg merge
1d 4h
Merged PRs (30d)
253

Description

[_Are the Types Wrong?_](https://arethetypeswrong.github.io/) is a tool that scans a library and highlights potential issues with importing it via Node, CommonJS, and ESM.

Running this tool against `@metamask/utils` shows [the following report](https://arethetypeswrong.github.io/?p=%40metamask%2Futils%408.3.0):

Screenshot 2024-03-05 at 9 58 18 AM

This tool comes with a [CLI](https://github.com/arethetypeswrong/arethetypeswrong.github.io/tree/main/packages/cli) which we can run manually to see these issues. We can also add it as a lint step in CI to verify that we don't have any issues going forward.

Once we've update this library so that it passes the above checks, we can copy any changes which are necessary to the module template and apply them to every other library.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by running the Are the Types Wrong CLI against @metamask/utils and compare its output with the linked report. Trace the package's module setup and the module template referenced in the issue, then apply the required changes across the other libraries. Done means @metamask/utils passes the checks, the template-derived packages are updated, and CI can lint for regressions.

Written by the indexing model from the issue text.

Assessment

Tech stack
node.js, typescript
Domain
build-system, ci-cd, tooling
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.