From fc481059974149df15211aa91efac6d0d9cbf097 Mon Sep 17 00:00:00 2001 From: Richard Steinmetz Date: Fri, 24 May 2024 15:58:36 +0200 Subject: [PATCH] Fix eslint issues --- src/mixins/EditorMixin.js | 6 +++--- src/store/appointmentConfigs.js | 8 ++++---- src/store/calendarObjectInstance.js | 10 +++++----- src/store/calendarObjects.js | 8 ++++---- src/store/calendars.js | 16 ++++++++-------- src/store/contacts.js | 2 +- src/store/fetchedTimeRanges.js | 4 ++-- src/store/importFiles.js | 8 ++++---- src/store/principals.js | 2 +- 9 files changed, 32 insertions(+), 32 deletions(-) diff --git a/src/mixins/EditorMixin.js b/src/mixins/EditorMixin.js index a762fa3a5c..cb01afa8ec 100644 --- a/src/mixins/EditorMixin.js +++ b/src/mixins/EditorMixin.js @@ -66,7 +66,7 @@ export default { }, computed: { ...mapState(useSettingsStore, { - currentUserTimezone: 'getResolvedTimezone' + currentUserTimezone: 'getResolvedTimezone', }), ...mapState(useCalendarsStore, ['initialCalendarsLoaded']), ...mapState(useCalendarObjectInstanceStore, ['calendarObject', 'calendarObjectInstance']), @@ -712,7 +712,7 @@ export default { try { await vm.loadingCalendars() const recurrenceId = await vm.calendarObjectInstanceStore.resolveClosestRecurrenceIdForCalendarObject({ - objectId, closeToDate + objectId, closeToDate, }) const params = Object.assign({}, vm.$route.params, { recurrenceId }) vm.$router.replace({ name: vm.$route.name, params }) @@ -798,7 +798,7 @@ export default { const closeToDate = dateFactory() await this.loadingCalendars() const recurrenceId = await this.calendarObjectInstanceStore.resolveClosestRecurrenceIdForCalendarObject({ - objectId, closeToDate + objectId, closeToDate, }) const params = Object.assign({}, this.$route.params, { recurrenceId }) next({ name: this.$route.name, params }) diff --git a/src/store/appointmentConfigs.js b/src/store/appointmentConfigs.js index 03555b7648..2c720f1ffd 100644 --- a/src/store/appointmentConfigs.js +++ b/src/store/appointmentConfigs.js @@ -38,7 +38,7 @@ export default defineStore('appointmentConfigs', { actions: { addInitialConfigs(configs) { for (const config of configs) { - ///TODO this.configs[config.id] = config + /// TODO this.configs[config.id] = config Vue.set(this.configs, config.id, config) } }, @@ -76,12 +76,12 @@ export default defineStore('appointmentConfigs', { return } - ///TODO this.configs[config.id] = config.clone() + /// TODO this.configs[config.id] = config.clone() Vue.set(this.configs, config.id, config.clone()) }, addConfigMutation(config) { - ///TODO this.configs[config.id] = config.clone() + /// TODO this.configs[config.id] = config.clone() Vue.set(this.configs, config.id, config.clone()) }, deleteConfigMutation(id) { @@ -89,7 +89,7 @@ export default defineStore('appointmentConfigs', { return } - ///TODO delete this.configs[id] + /// TODO delete this.configs[id] Vue.delete(this.configs, id) }, }, diff --git a/src/store/calendarObjectInstance.js b/src/store/calendarObjectInstance.js index 768de1aff4..2af6632a4a 100644 --- a/src/store/calendarObjectInstance.js +++ b/src/store/calendarObjectInstance.js @@ -912,7 +912,7 @@ export default defineStore('calendarObjectInstance', { }) { if (recurrenceRule.recurrenceRuleValue) { recurrenceRule.recurrenceRuleValue.setComponent('BYDAY', byDay) - //TODO recurrenceRule.byDay = byDay + // TODO recurrenceRule.byDay = byDay Vue.set(recurrenceRule, 'byDay', byDay) console.debug(recurrenceRule.recurrenceRuleValue._innerValue.toString()) @@ -932,7 +932,7 @@ export default defineStore('calendarObjectInstance', { }) { if (recurrenceRule.recurrenceRuleValue) { recurrenceRule.recurrenceRuleValue.setComponent('BYSETPOS', [bySetPosition]) - ///TODO recurrenceRule.bySetPosition = bySetPosition + /// TODO recurrenceRule.bySetPosition = bySetPosition Vue.set(recurrenceRule, 'bySetPosition', bySetPosition) console.debug(recurrenceRule.recurrenceRuleValue._innerValue.toString()) @@ -1594,7 +1594,7 @@ export default defineStore('calendarObjectInstance', { // Remove the recurrence-rule if (recurrenceRule.recurrenceRuleValue) { calendarObjectInstance.eventComponent.deleteAllProperties('RRULE') - ///TODO calendarObjectInstance.recurrenceRule = getDefaultEventObject().recurrenceRule + /// TODO calendarObjectInstance.recurrenceRule = getDefaultEventObject().recurrenceRule Vue.set(calendarObjectInstance, 'recurrenceRule', getDefaultEventObject().recurrenceRule) console.debug(calendarObjectInstance) @@ -1730,8 +1730,8 @@ export default defineStore('calendarObjectInstance', { if (recurrenceRule.recurrenceRuleValue) { recurrenceRule.recurrenceRuleValue.setComponent('BYSETPOS', []) - ///TODO recurrenceRule.bySetPosition = null - Vue.set(recurrenceRule, bySetPosition, null) + /// TODO recurrenceRule.bySetPosition = null + Vue.set(recurrenceRule, 'bySetPosition', null) console.debug(recurrenceRule.recurrenceRuleValue._innerValue.toString()) } diff --git a/src/store/calendarObjects.js b/src/store/calendarObjects.js index 4e3efeb381..3d821d4b14 100644 --- a/src/store/calendarObjects.js +++ b/src/store/calendarObjects.js @@ -209,8 +209,8 @@ export default defineStore('calendarObjects', { await calendarObject.dav.delete() } - ///TODO this.calendarObjects[calendarObject.id] = undefined - Vue.delete(state.calendarObjects, calendarObject.id) + /// TODO this.calendarObjects[calendarObject.id] = undefined + Vue.delete(this.calendarObjects, calendarObject.id) this.deleteCalendarObjectFromCalendarMutation({ calendar: { id: calendarObject.calendarId, @@ -325,7 +325,7 @@ export default defineStore('calendarObjects', { appendCalendarObjectsMutation({ calendarObjects = [] }) { for (const calendarObject of calendarObjects) { if (!this.calendarObjects[calendarObject.id]) { - ///TODO this.calendarObjects[calendarObject.id] = calendarObject + /// TODO this.calendarObjects[calendarObject.id] = calendarObject Vue.set(this.calendarObjects, calendarObject.id, calendarObject) } } @@ -339,7 +339,7 @@ export default defineStore('calendarObjects', { */ appendCalendarObjectMutation({ calendarObject }) { if (!this.calendarObjects[calendarObject.id]) { - ///TODO this.calendarObjects[calendarObject.id] = calendarObject + /// TODO this.calendarObjects[calendarObject.id] = calendarObject Vue.set(this.calendarObjects, calendarObject.id, calendarObject) } }, diff --git a/src/store/calendars.js b/src/store/calendars.js index c038f0b32f..6722e251b3 100644 --- a/src/store/calendars.js +++ b/src/store/calendars.js @@ -376,7 +376,7 @@ export default defineStore('calendars', { await calendar.dav.delete() this.calendars.splice(this.calendars.indexOf(calendar), 1) - ///TODO this.calendarsById.delete(calendar.id) + /// TODO this.calendarsById.delete(calendar.id) Vue.delete(this.calendarsById, calendar.id) }, @@ -396,7 +396,7 @@ export default defineStore('calendars', { }, deleteCalendarAfterTimeout({ calendar, countdown = 7 }) { - ///TODO this.calendarsById[calendar.id].countdown = countdown + /// TODO this.calendarsById[calendar.id].countdown = countdown Vue.set(this.calendarsById[calendar.id], 'countdown', countdown) const deleteInterval = setInterval(() => { @@ -406,7 +406,7 @@ export default defineStore('calendars', { countdown = 0 } - ///TODO this.calendarsById[calendar.id].countdown = countdown + /// TODO this.calendarsById[calendar.id].countdown = countdown Vue.set(this.calendarsById[calendar.id], 'countdown', countdown) }, 1000) const deleteTimeout = setTimeout(async () => { @@ -419,8 +419,8 @@ export default defineStore('calendars', { clearInterval(deleteInterval) } }, 7000) - ///TODO this.calendarsById[calendar.id].deleteInterval = deleteInterval - ///TODO this.calendarsById[calendar.id].deleteTimeout = deleteTimeout + /// TODO this.calendarsById[calendar.id].deleteInterval = deleteInterval + /// TODO this.calendarsById[calendar.id].deleteTimeout = deleteTimeout Vue.set(this.calendarsById[calendar.id], 'deleteInterval', deleteInterval) Vue.set(this.calendarsById[calendar.id], 'deleteTimeout', deleteTimeout) }, @@ -766,7 +766,7 @@ export default defineStore('calendars', { const calendar = mapDavCollectionToCalendar(response, principalsStore.getCurrentUserPrincipal) this.addCalendarMutation({ calendar }) importFilesStore.importCalendarRelation[file.id] = calendar.id - importFilesStore.importCalendarRelation = JSON.parse(JSON.stringify(importFilesStore.importCalendarRelation)) ///TODO remove with vue 3 + importFilesStore.importCalendarRelation = JSON.parse(JSON.stringify(importFilesStore.importCalendarRelation)) /// TODO remove with vue 3 } } @@ -858,9 +858,9 @@ export default defineStore('calendars', { const object = getDefaultCalendarObject(calendar) if (!this.calendars.some(existing => existing.id === object.id)) { this.calendars.push(object) - Vue.set(this.calendars, 0, this.calendars[0]) ///TODO remove with vue 3 + Vue.set(this.calendars, 0, this.calendars[0]) /// TODO remove with vue 3 } - ///TODO this.calendarsById[object.id] = object + /// TODO this.calendarsById[object.id] = object Vue.set(this.calendarsById, object.id, object) }, diff --git a/src/store/contacts.js b/src/store/contacts.js index 8b68197017..a4331ed018 100644 --- a/src/store/contacts.js +++ b/src/store/contacts.js @@ -48,7 +48,7 @@ export default defineStore('contacts', { // share the same email address, we will just follow // first come, first served. if (this.contactByEmail[email] === undefined) { - ///TODO this.contactByEmail[email] = contact + /// TODO this.contactByEmail[email] = contact Vue.set(this.contactByEmail, email, contact) } } diff --git a/src/store/fetchedTimeRanges.js b/src/store/fetchedTimeRanges.js index 623e622c81..a8b08d35f0 100644 --- a/src/store/fetchedTimeRanges.js +++ b/src/store/fetchedTimeRanges.js @@ -102,7 +102,7 @@ export default defineStore('fetchedTimeRanges', { } this.fetchedTimeRanges.push(fetchedTimeRange) - ///TODO this.fetchedTimeRangesById[fetchedTimeRange.id] = fetchedTimeRange + /// TODO this.fetchedTimeRangesById[fetchedTimeRange.id] = fetchedTimeRange Vue.set(this.fetchedTimeRangesById, fetchedTimeRange.id, fetchedTimeRange) }, @@ -118,7 +118,7 @@ export default defineStore('fetchedTimeRanges', { if (index !== -1) { this.fetchedTimeRanges.splice(index, 1) - ///TODO this.fetchedTimeRangesById.splice(timeRangeId, 1) + /// TODO this.fetchedTimeRangesById.splice(timeRangeId, 1) Vue.delete(this.fetchedTimeRangesById, timeRangeId) } }, diff --git a/src/store/importFiles.js b/src/store/importFiles.js index bf2d2fcb73..67ca3dac4f 100644 --- a/src/store/importFiles.js +++ b/src/store/importFiles.js @@ -62,7 +62,7 @@ export default defineStore('importFiles', { // TODO: use this.importFiles.push(file) directly in Vue 3 (reactive by default) this.importFiles = [...this.importFiles, file] - ///TODO this.importFilesById[file.id] = file + /// TODO this.importFilesById[file.id] = file Vue.set(this.importFilesById, file.id, file) }, @@ -70,9 +70,9 @@ export default defineStore('importFiles', { * Removes all files from state */ removeAllFiles() { - ///TODO this.importFiles = [] - ///TODO this.importFilesById = {} - ///TODO this.importCalendarRelation = {} + /// TODO this.importFiles = [] + /// TODO this.importFilesById = {} + /// TODO this.importCalendarRelation = {} Vue.set(this, 'importFiles', []) Vue.set(this, 'importFilesById', {}) diff --git a/src/store/principals.js b/src/store/principals.js index bf81264129..29b82f8459 100644 --- a/src/store/principals.js +++ b/src/store/principals.js @@ -129,7 +129,7 @@ export default defineStore('principals', { } this.principals.push(object) - ///TODO this.principalsById[object.id] = object + /// TODO this.principalsById[object.id] = object Vue.set(this.principalsById, object.id, object) }, },