Remove unused GlTooltip directive registrations

What does this MR do and why?

Removes the GlTooltipDirective import and the directives entry from components whose template has no v-gl-tooltip.

  • Touches 74 components.
  • Removing an unused registration does not change behaviour. A directive that no element uses never runs. A mixin whose members are never read only adds an inject or a method nobody calls.
  • The change was produced by the autofix of the new local-rules/vue-directive-pairing rule from !256699 (closed), then Prettier ran on the touched files.
  • The rule MR ships first with its unused-registration half switched off for this kind (reportUnused: false), because the missing-registration half is what prevents Vue 3 runtime breakage and must not wait. This cleanup can merge in any order relative to the other cleanups. A last MR switches the unused half on once they are all in.

Jest specs of the touched components were not changed. Where a spec still passes createMockDirective or provide: { glFeatures } for a registration that is now gone, the stub is inert. Cleaning those stubs up is left out of this MR on purpose to keep the diff mechanical.

How to set up and validate locally

  1. Check out !256699 (closed) on top of this branch, or copy its tooling/eslint-config/eslint-local-rules/ directory and eslint.config.mjs into your checkout.

  2. Run ESLint on the touched files:

    git diff --name-only origin/master...HEAD | xargs ./node_modules/.bin/eslint

    No local-rules/vue-directive-pairing error is reported.

  3. Run the Jest specs of the touched components:

    git diff --name-only origin/master...HEAD | sed -E 's#^(ee/)?app/assets/javascripts/#\1spec/frontend/#; s#\.vue$#_spec.js#' | xargs ls 2>/dev/null | xargs yarn jest

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

References

🤖 Generated with Claude Code

Edited by Miguel Rincon

Merge request reports

Loading
Loading