Skip to content

Commit

Permalink
fix: vue/custom-event-name-casing
Browse files Browse the repository at this point in the history
  • Loading branch information
raimund-schluessler committed Aug 18, 2024
1 parent 402adb1 commit 51bfcf6
Show file tree
Hide file tree
Showing 10 changed files with 27 additions and 27 deletions.
4 changes: 2 additions & 2 deletions src/components/EntityTable/Collection.vue
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ export default {
},
},
emits: [
'select-entity',
'selectEntity',
],
data() {
return {
Expand Down Expand Up @@ -186,7 +186,7 @@ export default {
]),

selectEntity() {
this.$emit('select-entity', this.entity)
this.$emit('selectEntity', this.entity)
},

startRename() {
Expand Down
12 changes: 6 additions & 6 deletions src/components/EntityTable/EntityTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ License along with this library. If not, see <http://www.gnu.org/licenses/>.
:mode="mode"
draggable="true"
class="entity"
@select-entity="selectEntity"
@selectEntity="selectEntity"

Check warning on line 106 in src/components/EntityTable/EntityTable.vue

View workflow job for this annotation

GitHub Actions / NPM lint

v-on event '@selectEntity' must be hyphenated
@dragstart="dragStart(item, $event)"
@dragend="dragEnd"
@drop="dropped(item, $event)"
Expand All @@ -126,7 +126,7 @@ License along with this library. If not, see <http://www.gnu.org/licenses/>.
:class="{ 'dragged': isDragged(item) }"
:mode="mode"
:show-actions="false"
@select-entity="selectEntity" />
@selectEntity="selectEntity" />

Check warning on line 129 in src/components/EntityTable/EntityTable.vue

View workflow job for this annotation

GitHub Actions / NPM lint

v-on event '@selectEntity' must be hyphenated
</div>
<div id="drag-preview" class="entitytable entitytable--drag-preview">
<div v-for="entity in draggedEntities" :key="entity.key" class="row">
Expand Down Expand Up @@ -229,7 +229,7 @@ export default {
},
emits: [
'unlink',
'selected-items-changed',
'selectedItemsChanged',
],
data() {
return {
Expand Down Expand Up @@ -488,7 +488,7 @@ export default {
/**
* Emits that the selected items have changed
*/
this.$emit('selected-items-changed', this.selectedItems)
this.$emit('selectedItemsChanged', this.selectedItems)
},

placeholder(position) {
Expand Down Expand Up @@ -534,7 +534,7 @@ export default {
return true
})
if (before !== this.selectedEntities.length) {
this.$emit('selected-items-changed', this.selectedItems)
this.$emit('selectedItemsChanged', this.selectedItems)
}
},

Expand All @@ -561,7 +561,7 @@ export default {
} else {
this.selectedEntities.push(entity)
}
this.$emit('selected-items-changed', this.selectedItems)
this.$emit('selectedItemsChanged', this.selectedItems)
},
isSelected(item) {
return this.selectedEntities.includes(item)
Expand Down
6 changes: 3 additions & 3 deletions src/components/EntityTable/Item.vue
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ License along with this library. If not, see <http://www.gnu.org/licenses/>.
<TagList :tags="entity.tags" />
</div>
<div v-if="entity.syncStatus" class="column">
<ItemStatusDisplay :status="entity.syncStatus" @reset-status="resetStatus(entity)" />
<ItemStatusDisplay :status="entity.syncStatus" @resetStatus="resetStatus(entity)" />

Check warning on line 72 in src/components/EntityTable/Item.vue

View workflow job for this annotation

GitHub Actions / NPM lint

v-on event '@resetStatus' must be hyphenated
</div>
</div>
</template>
Expand Down Expand Up @@ -117,7 +117,7 @@ export default {
},
},
emits: [
'select-entity',
'selectEntity',
],
computed: {
imageSrc() {
Expand Down Expand Up @@ -155,7 +155,7 @@ export default {
t,

selectEntity() {
this.$emit('select-entity', this.entity)
this.$emit('selectEntity', this.entity)
},

...mapMutations(['setSyncStatus']),
Expand Down
6 changes: 3 additions & 3 deletions src/components/ItemInstances.vue
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ License along with this library. If not, see <http://www.gnu.org/licenses/>.
<li v-for="uuid in instance.uuids" :key="`uuids${instance.id}${uuid.id}`">
<span>{{ uuid.uuid }}</span>
<NcActions :boundaries-element="boundaries">
<NcActionButton :close-after-click="true" @click="$emit('open-barcode', uuid.uuid)">
<NcActionButton :close-after-click="true" @click="$emit('openBarcode', uuid.uuid)">
<template #icon>
<Qrcode :size="20" />
</template>
Expand Down Expand Up @@ -222,7 +222,7 @@ License along with this library. If not, see <http://www.gnu.org/licenses/>.
<form id="new_instance" method="POST" />
<form id="edit_instance" method="POST" />
<!-- qrcode -->
<QrScanModal v-model:qr-modal-open="qrModalOpen" @codes-detected="foundCodes" />
<QrScanModal v-model:qr-modal-open="qrModalOpen" @codesDetected="foundCodes" />

Check warning on line 225 in src/components/ItemInstances.vue

View workflow job for this annotation

GitHub Actions / NPM lint

v-on event '@codesDetected' must be hyphenated
</div>
</template>

Expand Down Expand Up @@ -279,7 +279,7 @@ export default {
},
},
emits: [
'open-barcode',
'openBarcode',
],
data() {
return {
Expand Down
8 changes: 4 additions & 4 deletions src/components/ItemStatusDisplay.vue
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ export default {
},
},
emits: [
'status-clicked',
'reset-status',
'statusClicked',
'resetStatus',
],
data() {
return {
Expand All @@ -88,7 +88,7 @@ export default {
},
methods: {
statusClicked() {
this.$emit('status-clicked')
this.$emit('statusClicked')
},
checkTimeout(newStatus) {
if (newStatus) {
Expand All @@ -98,7 +98,7 @@ export default {
if (newStatus.status === 'success') {
this.resetStatusTimeout = setTimeout(
() => {
this.$emit('reset-status')
this.$emit('resetStatus')
}, 5000,
)
}
Expand Down
4 changes: 2 additions & 2 deletions src/components/QrScanModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export default {
},
emits: [
'update:qrModalOpen',
'codes-detected',
'codesDetected',
],
data() {
return {
Expand All @@ -75,7 +75,7 @@ export default {
this.$emit('update:qrModalOpen', false)
},
onDetect(detectedCodes) {
this.$emit('codes-detected', detectedCodes)
this.$emit('codesDetected', detectedCodes)
},

async onInit(promise) {
Expand Down
2 changes: 1 addition & 1 deletion src/components/RelationModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ License along with this library. If not, see <http://www.gnu.org/licenses/>.
:allow-deletion="false"
:filter-only="true"
mode="selection"
@selected-items-changed="selectedItemsChanged" />
@selectedItemsChanged="selectedItemsChanged" />

Check warning on line 66 in src/components/RelationModal.vue

View workflow job for this annotation

GitHub Actions / NPM lint

v-on event '@selectedItemsChanged' must be hyphenated
</div>

<div class="footer">
Expand Down
8 changes: 4 additions & 4 deletions src/views/AppContent/ItemDetails.vue
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ License along with this library. If not, see <http://www.gnu.org/licenses/>.
<h3>
<span>{{ t('inventory', 'Instances') }}</span>
</h3>
<ItemInstances :item="item" :instance-id="instanceId" @open-barcode="(uuid) => openBarcode(uuid)" />
<ItemInstances :item="item" :instance-id="instanceId" @openBarcode="(uuid) => openBarcode(uuid)" />

Check warning on line 173 in src/views/AppContent/ItemDetails.vue

View workflow job for this annotation

GitHub Actions / NPM lint

v-on event '@openBarcode' must be hyphenated
</div>
<div v-if="parentItems.length" class="paragraph">
<h3>
Expand All @@ -180,7 +180,7 @@ License along with this library. If not, see <http://www.gnu.org/licenses/>.
<EntityTable :items="parentItems"
:unlink="true"
:filter-only="true"
@selected-items-changed="selectedParentsChanged"
@selectedItemsChanged="selectedParentsChanged"

Check warning on line 183 in src/views/AppContent/ItemDetails.vue

View workflow job for this annotation

GitHub Actions / NPM lint

v-on event '@selectedItemsChanged' must be hyphenated
@unlink="unlink('parent')" />
</div>
</div>
Expand All @@ -192,7 +192,7 @@ License along with this library. If not, see <http://www.gnu.org/licenses/>.
<EntityTable :items="subItems"
:unlink="true"
:filter-only="true"
@selected-items-changed="selectedSubChanged"
@selectedItemsChanged="selectedSubChanged"

Check warning on line 195 in src/views/AppContent/ItemDetails.vue

View workflow job for this annotation

GitHub Actions / NPM lint

v-on event '@selectedItemsChanged' must be hyphenated
@unlink="unlink('sub')" />
</div>
</div>
Expand All @@ -204,7 +204,7 @@ License along with this library. If not, see <http://www.gnu.org/licenses/>.
<EntityTable :items="relatedItems"
:unlink="true"
:filter-only="true"
@selected-items-changed="selectedRelatedChanged"
@selectedItemsChanged="selectedRelatedChanged"
@unlink="unlink('related')" />
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/views/AppContent/ItemsOverview.vue
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ License along with this library. If not, see <http://www.gnu.org/licenses/>.
:collections="collections"
:collection-type="collection" />
<!-- qrcode -->
<QrScanModal v-model:qr-modal-open="qrModalOpen" :status-string="statusMessage" @codes-detected="foundUuid" />
<QrScanModal v-model:qr-modal-open="qrModalOpen" :status-string="statusMessage" @codesDetected="foundUuid" />
</div>
</template>

Expand Down
2 changes: 1 addition & 1 deletion src/views/AppSidebar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ License along with this library. If not, see <http://www.gnu.org/licenses/>.
</template>
<template v-if="place && !loading" #default>
<!-- qrcode -->
<QrScanModal v-model:qr-modal-open="qrModalOpen" :status-string="statusMessage" @codes-detected="foundUuid" />
<QrScanModal v-model:qr-modal-open="qrModalOpen" :status-string="statusMessage" @codesDetected="foundUuid" />
<NcModal v-if="showBarcode"
class="qrcode-modal"
size="small"
Expand Down

0 comments on commit 51bfcf6

Please sign in to comment.