Remove unused mixin and directive registrations

What does this MR do and why?

Removes mixin and directive registrations that the component never uses. This group holds the smaller kinds and the files with more than one kind of unused registration:

  • timeagoMixin (12 files)

  • InternalEvents.mixin() (12 files)

  • Tracking.mixin() (8 files)

  • glAbilitiesMixin() (1 file)

  • GlOutsideDirective, GlResizeObserverDirective, autofocusonshow, DynamicHeight and a Tooltip key (8 files)

  • files that combine GlTooltip, SafeHtml, GlModal or glFeatureFlagsMixin removals (12 files)

  • Touches 53 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-mixin-pairing and vue-directive-pairing rule from !256664 (merged) and !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 !256664 (merged) and !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-mixin-pairing and 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