Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Platform] [Outdated design token references] I want a CI check to identify unused Tailwind classes in application code So that I can prevent broken styles #202

Open
Enjoy2Live opened this issue Jul 29, 2024 · 2 comments
Labels

Comments

@Enjoy2Live
Copy link
Member

Enjoy2Live commented Jul 29, 2024

User Story

As a developer working on a monorepo with generated design tokens
I want a CI check to identify unused Tailwind classes in application code
So that I can prevent style inconsistencies and broken styles caused by outdated design token references.

Reasoning

Design tokens are generated from a Figma plugin called tokens studio and transformed into Tailwind classes by the packages/tailwind-constructor. Changes in design tokens can result in the removal of Tailwind classes, leading to broken styles in applications if not detected early. A CI check will proactively identify these issues before they reach production.

Idea

Implement a CI job that:

  1. Parses all application code files for Tailwind class usage. (can be achieved with eslint-plugin-tailwindcss found in our global eslint package)
  2. Generates a report of unused Tailwind classes along with their locations in the codebase.
  3. Fails the CI build if non Tailwind classes are found.

Acceptance Criteria

  • The CI job successfully identifies non Tailwind classes in all application code files.
  • The generated report accurately lists non Tailwind classes and their file locations.
  • The CI build fails when non Tailwind classes are detected.
  • The CI job provides clear and actionable output to developers.
  • The CI job has reasonable performance.
@zar92 zar92 added the Platform label Aug 4, 2024
@dbradham
Copy link
Contributor

@Enjoy2Live is there anyone on the team other than yourself who could take this on?

@Enjoy2Live
Copy link
Member Author

@dbradham

@yacineKahlerras might be interested in this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants