chore: remove unused component registrations and slot-scope variables - #906
chore: remove unused component registrations and slot-scope variables#906marekl11 wants to merge 1 commit into
Conversation
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.
|
|
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 I do not think this change can be the cause: all nine removals are local One thing you may want to look at separately: |
|
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. |
There was a problem hiding this comment.
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.



Clearing the eslint no-unused-components and no-unused-vars errors in
resources/js/components:
components:but never usedin their own template - ExternalLink (three files), FileUploader,
EventDeviceSummary, DashboardEvent, DeviceModel, InfiniteLoading and
Group
{ ok, cancel }and thennever read
okI checked each removed registration for both PascalCase and kebab-case use
in its own file before dropping it. No template markup changes.