MetaMask / MetaMask/metamask-design-system
Fix `@typescript-eslint/no-explicit-any` Errors in Design Tokens Tests
- Dominant language
- TypeScript
- Stars
- 37
- Forks
- 14
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 60
Description
### **Description**
This issue tracks fixing TypeScript ESLint errors related to `@typescript-eslint/no-explicit-any` in the `metamask-design-system` repository. Temporary ESLint disable comments will be added to suppress these errors, but they need to be removed, and the underlying issues resolved.


### **Technical Details**
- Remove ESLint `@typescript-eslint/no-explicit-any` disable comments from the affected files.
- Replace `any` types with appropriate, specific types.
- Run `yarn lint` to verify that no new linting errors are introduced.
#### Affected Files
- `packages/design-tokens/src/js/themes/darkTheme/colors.test.ts`: Lines 19, 20, 21, and 55.
- `packages/design-tokens/src/js/themes/lightTheme/colors.test.ts`: Lines 19, 20, 21, and 55.
- `packages/design-tokens/src/js/typography/typography.test.ts`: Line 40.
- `packages/design-tokens/stories/test-utils/getJSColors.ts`: Line 9.
- `packages/design-tokens/stories/test-utils/useJsonColor.ts`: Line 50.
### **Acceptance Criteria**
- ESLint disable comments are removed from all affected files.
- Specific and appropriate types replace `any` in the identified lines.
- Running `yarn lint` passes without errors.
### **References**
- [TypeScript ESLint `no-explicit-any`](https://typescript-eslint.io/rules/no-explicit-any/)
Contributor guide
Research direction
Start with the listed test and utility files under packages/design-tokens, especially the affected lines containing ESLint disable comments. Replace the any types with specific types, remove the disables, and run yarn lint. Done means all listed files are updated and lint passes without errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- eslint, typescript
- Domain
- design, testing, tooling
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 68/100