Skip to content

Fix @typescript-eslint/no-explicit-any Errors in Design Tokens Tests #127

@georgewrmarshall

Description

@georgewrmarshall

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.

Screenshot 2024-11-18 at 1 21 43 PM

Screenshot 2024-11-18 at 2 11 10 PM

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions