Remove CSS-in-Js before running utils comparison script
What does this MR do and why?
The compare_css_util_classes
script has a tendency to fail when the
CSS-in-Js was built prior to running it. This has caused a broken
master
after we introduced a prelint:stylelint
NPM script that
builds Tailwind before running Stylelint, which also happens to run
before the comparison script in the static-analysis
CI job.
We are therefore adding a prelint:tailwind-utils
NPM script to ensure
that the CSS-in-Js always gets removed before executing the script.
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.
How to set up and validate locally
-
Start by removing the CSS-in-Js file if any:
rm config/helpers/tailwind/css_in_js.js
-
Run the legacy utils comparison script:
yarn lint:tailwind-utils
- It should succeed.
-
Run the script again.
- On
master
, the script should error out this time and in all subsequent runs unless you manually remove the CSS-in-Js before running the script. - On this branch, the script should always succeed.
- On
Re gitlab-org/quality/engineering-productivity/master-broken-incidents#7786 (closed)