Skip to content

chore: remove unused component registrations and slot-scope variables - #906

Open
marekl11 wants to merge 1 commit into
TheRestartProject:developfrom
marekl11:fix/unused-vue-refs
Open

chore: remove unused component registrations and slot-scope variables#906
marekl11 wants to merge 1 commit into
TheRestartProject:developfrom
marekl11:fix/unused-vue-refs

Conversation

@marekl11

@marekl11 marekl11 commented Sep 3, 2026

Copy link
Copy Markdown

Clearing the eslint no-unused-components and no-unused-vars errors in
resources/js/components:

  • nine components imported and registered in components: but never used
    in their own template - ExternalLink (three files), FileUploader,
    EventDeviceSummary, DashboardEvent, DeviceModel, InfiniteLoading and
    Group
  • three b-modal footer slots that destructured { ok, cancel } and then
    never read ok

I checked each removed registration for both PascalCase and kebab-case use
in its own file before dropping it. No template markup changes.

Nine components were imported and registered but never used in their
templates, and three b-modal footer slots destructured scope variables
they never read; drop them all to clear the eslint
no-unused-components / no-unused-vars errors.
@sonarqubecloud

sonarqubecloud Bot commented Sep 3, 2026

Copy link
Copy Markdown

@marekl11

marekl11 commented Sep 4, 2026

Copy link
Copy Markdown
Author

The CircleCI build failed at "Run main Playwright tests" with a timeout - PHPUnit and Jest passed, and the Playwright step produced no failing test, it just went quiet until the step's no_output_timeout: 10m fired. I have rebased on develop to retrigger it.

I do not think this change can be the cause: all nine removals are local components: registrations, which only affect the template in the same file, and none of the removed tags appear there in PascalCase, kebab-case or :is= form. vue-infinite-loading / InfiniteLoading appears nowhere in resources/ at all - GroupEventScrollTable renders a b-table. The ok slot variable was unread in all three modals.

One thing you may want to look at separately: playwright.config.js sets timeout: 5 * 60 * 1000 with the comment that it "needs to be less than 10 minutes to avoid Circle CI timeout kicking in", but five test files call test.slow(), which triples that to 15 minutes - longer than the step's 10-minute silence ceiling. A single slow test can therefore take the whole step down with no output.

@marekl11

marekl11 commented Sep 5, 2026

Copy link
Copy Markdown
Author

Small correction to my last comment: the rebase did not actually retrigger CircleCI - build 5801 is still the only one for this PR, so the red check is the original timeout rather than a fresh failure. It will need a re-run from your side whenever you get to it.

@edwh edwh left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this — careful work, and easy to merge.

(AI-assisted review by Claude, run at a maintainer's request and posted with their supervision. Checks described below so they can be repeated.)

The nine removed registrations are all genuinely unused. Each checked against its own pre-removal file for PascalCase, kebab-case and dynamic <component :is> — no hits in any of the nine. That includes InfiniteLoading in GroupEventScrollTable.vue, where an accidental removal would have broken a live infinite scroll; it is import-and-register only.

The slot-scope changes are correct and complete. ok is unreferenced in all three footers, and exactly three slot-scope="{ ok, cancel }" blocks exist in resources/js. Dropping the binding entirely in EventAddVolunteerModal, rather than keeping { cancel }, is right — neither binding is used there.

One thing your description undersells. GroupVolunteers.vue had:

import Group from '../mixins/group'
components: {Group, CollapsibleSection, GroupVolunteer},

A mixin imported and registered as a component — an actual bug, not just an unused reference. The same mixin is already applied correctly via mixins: [group] two lines below. Worth a line in the description, as it is more than lint tidying.


This is good to merge as it stands. If you would like to take more on, either of these would be welcome — as a separate PR, or added here, whichever you prefer.

1. Drop the now-unused dependency. This removed the only import of vue-infinite-loading, so it survives only in package.json. A one-line removal plus a lockfile update.

2. Add a lint step for the Laravel-side JS — the more valuable one. vue/no-unused-components is already enabled through flat/vue2-essential in eslint.config.js, but nothing runs eslint in CI for resources/js, so these errors only appear locally and nothing stops them returning. .circleci/config.yml already lints the Nuxt client (cd client && npm run lint) and that step is the pattern to copy.

Fair warning on the second: a first run across resources/js will almost certainly surface more than the nine here, so it may want to be "fix the rest, then add the gate" rather than one commit. Entirely reasonable to stop at this PR and leave that to us — say the word either way.

Happy to see it go in.

@edwh edwh changed the title Remove unused component registrations and slot-scope variables chore: remove unused component registrations and slot-scope variables Sep 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants