MetaMask / MetaMask/metamask-mobile
chore: Verify formatting on CI
- Dominant language
- TypeScript
- Stars
- 3k
- Forks
- 1.7k
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 669
Description
### What is this about?
There should be a step on CI that verifies that the code is formatted properly. This can easily be done using the `yarn format` command that leverages our prettier config. We should also run yarn format on the entire codebase in order to address all of the current issues.
Why? Because lots of people do not have auto format enabled in their editor which leaves code unformatted. The result is that if a developer who does have auto format enabled changes even one character, there can be several changes applied in that file. Especially since we are trying to reduce the number of lines changed per PR, this can get in the way of that and even put a developer over the threshold.
### Scenario
_No response_
### Design
_No response_
### Technical Details
- Leverage the `yarn format` command`
- We should audit the prettier config to see if there is anything we want to change.
### Threat Modeling Framework
_No response_
### Acceptance Criteria
- [ ] A large scale yarn format applied to the entire codebase such that we resolve all of the current format issues
- [ ] a CI step that runs on every PR that verifies there are no format changes that need to be made.
### Stakeholder review needed before the work gets merged
- [x] Engineering (needed in most cases)
- [ ] Design
- [ ] Product
- [ ] QA (automation tests are required to pass before merging PRs but not all changes are covered by automation tests - please review if QA is needed beyond automation tests)
- [ ] Security
- [ ] Legal
- [ ] Marketing
- [ ] Management (please specify)
- [ ] Other (please specify)
### References
_No response_
Contributor guide
Research direction
Start by locating the existing `yarn format` command, the Prettier configuration, and the CI workflow definitions. Run the formatter across the codebase and inspect the configuration for required changes. Done means the repository has no remaining formatting changes and every pull request runs a CI check that detects them.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- ci-cd, developer-experience, tooling
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100