Fix deprecated class finder script
What does this MR do and why?
Follow-up from !130 (comment 2000118043)
Bug fix for the deprecated class finder script. We need to ensure an exact match, instead of a partial match.
This fixes an issue with the previous version that made incorrect replacements like these:
gl-spinner-container => gl-animate-spinner-container
gl-spinner => gl-animate-spinner
gl-spinner-light => gl-animate-spinner-light
gl-spinner-md => gl-animate-spinner-md
We only want to replace gl-spin
if it's a standalone class name, not a fragment of another class name.
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
-
Configure a local GitLab Docs environment: https://gitlab.com/gitlab-org/technical-writing-group/gitlab-docs-hugo/-/blob/main/doc/setup.md. -
Run make lint-frontend
. It should not find any deprecated classes. -
Add a gl-spin
class somewhere, and runmake lint-frontend
again. This class should raise a warning.
Merge request acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this merge request.
Edited by Hiru Fernando