Add Tailwind CSS Dangerfile
What does this MR do and why?
Add Tailwind CSS Dangerfile
This adds a new Dangerfile to do some Tailwind-related reporting. Currently, we check whether the diff potentially contains interpolated CSS utils. We might extend this rule to report additional info about CSS utils usages.
We're adding this to prevent CSS utilities from being built dynamically via string interpolation as that would prevent Tailwind from generating them.
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
How to set up and validate locally
- Insert some text within a file that would be detected as a potential interpolated utils:
- In a Vue or Js file, add something like
gl-test-${
. - In a HAML or Ruby file, add something like
gl-test-#{
.
- In a Vue or Js file, add something like
- Commit the changes.
- Run Danger:
bin/rake danger_local
.- You should see a warning about the files you've added the pattern to.