MetaMask / MetaMask/core

Add missing controller guidelines

Open Beginner friendly
#5,335 2 comments 0 reactions 0 assignees View on GitHub
category-documentation github-migration-triaged team-wallet-framework wf-documentation
Dominant language
TypeScript
Stars
413
Forks
308
Avg merge
1d 4h
Merged PRs (30d)
253

Description

We have some missing controller guidelines:

- State should be coherent at all times. If properties are intended to be used in conjunction with each other they should be consistent, and we should have runtime validation to ensure that this is always the case.
- Use `withController` or `setupController` pattern to set up controllers in tests.
- Don't mock the messenger in tests.

Although the following is a package guideline, we could consider repeating it in the controller guidelines because that is probably more likely the use case:

- New controller packages should always start at 0.0.0 (otherwise they run the risk of being accidentally published).

Contributor guide

No contributing guide indexed for this repository

Research direction

Find the existing controller guidelines and package guidelines in the repository; the issue does not name their files. Read the surrounding guidance, then incorporate the listed controller state, test setup, messenger mocking, and package-version notes where appropriate. Done when the relevant guidelines cover these points without duplicating or contradicting existing guidance.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
67/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.