Kebab-case names for `$emit`ted Vue events
The following discussion from !1690 (merged) should be addressed:
-
@moffer started a discussion: (+1 comment) Eslint complains here to use kebab case.
oh, it does? then we should include that configuration in
client/package.json
and make sure it's checked, because there are several more event names in lowerCamelCase through our codebase!Could be part of a follow-up though, since that would allow converting all such cases at once. I'll create an issue for it once I learn how to check for the problem!
Tasks
- adjust the JS Linter to check for this, looks like this?
https://eslint.vuejs.org/rules/custom-event-name-casing.html - fix all existing events with lowerCamelCase (one per commit)
=== (TOPBAR REFACTORING WILL CHANGE THIS) ===
client/src/components/Topbar/Baskets/MenuBasketsEntry.vue: this.$emit('basketRemove', this.basket.id, userId)
client/src/components/Topbar/Bells/MenuBellsEntry.vue: @click="$emit('bellRead', bell)"
client/src/components/Topbar/Bells/MenuBellsEntry.vue: @click.middle="$emit('bellRead', bell)"
client/src/components/Topbar/Bells/MenuBellsEntry.vue: @click.stop.prevent="$emit('remove', bell.id)"
client/src/components/Topbar/Messages/MenuMessagesEntry.vue: this.$emit('chatOpened')
src/Modules/Dashboard/components/ActivityOptionListings.vue: this.$emit('reloadData')
src/Modules/Region/components/ThreadPost.vue: @reactionAdd="$emit('reactionAdd', $event)"
src/Modules/Region/components/ThreadPost.vue: @reactionRemove="$emit('reactionRemove', $event)"
src/Modules/Region/components/ThreadPostActions.vue: this.$emit('reactionRemove', key)
src/Modules/Region/components/ThreadPostActions.vue: this.$emit('reactionAdd', key)
src/Modules/Register/components/RegisterLegalAgreement.vue: @change="$emit('update:acceptGdpr', $event)"
src/Modules/Register/components/RegisterLegalAgreement.vue: @input="$emit('update:acceptLegal', $event)"
src/Modules/Register/components/RegisterLegalAgreement.vue: @input="$emit('update:subscribeNewsletter', $event)"
src/Modules/Register/components/RegisterSuccess.vue: @click="$emit('loadLogin')"
src/Modules/Voting/components/MultiSelectionVotingComponent.vue: votingRequestValues () { this.$emit('updateVotingRequestValues', this.votingRequestValues) }
src/Modules/Voting/components/MultiSelectionVotingComponent.vue: this.$emit('updateValidSelection', true)
src/Modules/Voting/components/MultiSelectionVotingComponent.vue: this.$emit('updateVotingRequestValues', this.votingRequestValues)
src/Modules/Voting/components/ScoreVotingComponent.vue: votingRequestValues () { this.$emit('updateVotingRequestValues', this.votingRequestValues) }
src/Modules/Voting/components/ScoreVotingComponent.vue: this.$emit('updateValidSelection', true)
src/Modules/Voting/components/ScoreVotingComponent.vue: this.$emit('updateVotingRequestValues', this.votingRequestValues)
src/Modules/Voting/components/SingleSelectionVotingComponent.vue: isValidSelection () { this.$emit('updateValidSelection', this.isValidSelection) },
src/Modules/Voting/components/SingleSelectionVotingComponent.vue: votingRequestValues () { this.$emit('updateVotingRequestValues', this.votingRequestValues) }
src/Modules/Voting/components/SingleSelectionVotingComponent.vue: this.$emit('updateValidSelection', this.isValidSelection)
src/Modules/Voting/components/SingleSelectionVotingComponent.vue: this.$emit('updateVotingRequestValues', this.votingRequestValues)
src/Modules/Voting/components/ThumbVotingComponent.vue: votingRequestValues () { this.$emit('updateVotingRequestValues', this.votingRequestValues) }
src/Modules/Voting/components/ThumbVotingComponent.vue: this.$emit('updateValidSelection', true)
src/Modules/Voting/components/ThumbVotingComponent.vue: this.$emit('updateVotingRequestValues', this.votingRequestValues)
src/Modules/Voting/components/VoteForm.vue: this.$emit('disableVoteForm')
=== (STOREWALL REFACTORING WILL CHANGE THIS) ===
src/Modules/WallPost/components/WallPost.vue: @ok="$emit('deletePost', post.id)"
Edited by Chris Oelmueller