You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Implement a new ESLint rule to encourage the use of theme color tokens in lightTheme and darkTheme over the brandColor object, similar to the existing prefer-theme-color-classnames rule. This new rule will help enforce consistent theming across projects by preferring light and dark theme color tokens.
Technical Details
Create a rule within the @metamask/design-tokens plugin to enforce the use of theme color JS tokens instead of colors inside of the brandColor object.
The rule should check for literal color references and suggest the corresponding theme color tokens from the light and dark themes.
Acceptance Criteria
The rule must detect direct literal color references like brandColor.blue050, brandColor.white, brandColor.black etc and suggest the corresponding theme color tokens.
Proper documentation must be added, similar to the prefer-theme-color-classnames rule.
Unit tests must be included to verify the rule's functionality.
Ensure compatibility with existing ESLint configurations used in MetaMask projects.
This rule aims to ensure that theme colors are centralized and easily manageable, promoting consistent theming and simplifying updates across the project's UI.
The text was updated successfully, but these errors were encountered:
Description
Implement a new ESLint rule to encourage the use of theme color tokens in
lightTheme
anddarkTheme
over thebrandColor
object, similar to the existingprefer-theme-color-classnames
rule. This new rule will help enforce consistent theming across projects by preferring light and dark theme color tokens.Technical Details
@metamask/design-tokens
plugin to enforce the use of theme color JS tokens instead of colors inside of thebrandColor
object.Acceptance Criteria
brandColor.blue050
,brandColor.white
,brandColor.black
etc and suggest the corresponding theme color tokens.prefer-theme-color-classnames
rule.References
This rule aims to ensure that theme colors are centralized and easily manageable, promoting consistent theming and simplifying updates across the project's UI.
The text was updated successfully, but these errors were encountered: