chore: resolving jazzicon lint violations#747
Closed
georgewrmarshall wants to merge 1 commit intomainfrom
Closed
Conversation
georgewrmarshall
added a commit
that referenced
this pull request
Jul 16, 2025
## **Description**
This PR significantly enhances the React Native developer experience by
adding comprehensive Tailwind IntelliSense and ESLint support to the
`@metamask/design-system-twrnc-preset` package. This bridges the gap
between TWRNC usage and standard Tailwind tooling, providing React
Native developers with the same excellent developer experience as React
Web developers.
**What is the reason for the change?**
React Native developers using TWRNC were missing critical developer
experience features:
- No IntelliSense/autocomplete for design system classes
- No ESLint validation of Tailwind classnames
- No detection of invalid classes, ordering issues, or shorthand
suggestions
- Difficult discovery of available design system tokens
- Manual enforcement of design system color usage
**What is the improvement/solution?**
We've implemented a comprehensive Tailwind configuration system that:
- Generates static `tailwind.config.js` files compatible with standard
Tailwind tooling
- Provides full IntelliSense support with autocomplete for all design
system classes
- Enables ESLint integration with `eslint-plugin-tailwindcss` for React
Native projects
- Enforces design system token usage (eliminates default Tailwind colors
like `red-500`)
- Supports both template literals (`tw\`classnames\``) and function
calls (`tw('classnames')`)
- Maintains theme-agnostic classnames that work with both light and dark
themes
## **Related issues**
Fixes: #747
## **Manual testing steps**
1. **IntelliSense Testing**:
- Open a React Native file in VS Code (e.g.,
`packages/design-system-react-native/src/components/Button/Button.tsx`)
- Start typing `tw\`bg-` and verify IntelliSense shows design system
colors like `bg-default`, `bg-primary-default`
- Try typing `tw\`text-` and verify design system text colors appear
- Confirm no default Tailwind colors like `bg-red-500` appear in
suggestions
2. **ESLint Validation Testing**:
- Try typing an invalid class like `tw\`bg-red-500` and verify ESLint
flags it as invalid
- Test class ordering suggestions (e.g., `tw\`p-4 flex` suggests
reordering to `tw\`flex p-4`)
- Verify shorthand suggestions work (e.g., `tw\`h-4 w-4` suggests
`tw\`size-4`)
3. **Build and Test**:
- Run `yarn workspace @metamask/design-system-react-native test` -
should pass
- Run `yarn lint` - should pass with only expected template literal
warnings
- Run `yarn workspace @metamask/design-system-twrnc-preset build` -
should build successfully
## **Screenshots/Recordings**
### **Before**
- No IntelliSense for design system classes in React Native
- No ESLint validation of Tailwind classnames
- Manual discovery of available design tokens
- Potential usage of non-design-system colors
- String concatenation patterns with `.trim()`
### **After**
- Full IntelliSense with autocomplete for all design system classes
- ESLint catches invalid classnames and ordering issues
- Automatic enforcement of design system token usage
- Direct `tw` template literal usage for better tooling support
- Improved developer productivity with instant feedback
https://github.com/user-attachments/assets/665954e7-d38b-4c29-9a41-23ebfc6c4635
Mobile storybook and components still render as expected
https://github.com/user-attachments/assets/44327e03-23e0-4ee7-bb42-149283e04a49
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Related issues
Fixes:
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist