From 5a4ef51f5a6ac7655710884b6f82907d19aa68a4 Mon Sep 17 00:00:00 2001 From: Richard Steinmetz Date: Tue, 17 Oct 2023 14:50:25 +0200 Subject: [PATCH] chore(eslint): fix all errors Signed-off-by: Richard Steinmetz --- src/components/AppNavigation/ContactsSettings.vue | 2 +- .../AppNavigation/Settings/SettingsAddressbook.vue | 2 +- src/components/EntityPicker/ContactsPicker.vue | 2 +- src/components/Properties/PropertyText.vue | 2 +- src/models/circle.ts | 4 ++-- src/models/constants.ts | 1 + src/models/member.ts | 6 +++--- src/services/circles.ts | 4 ++-- src/views/Contacts.vue | 2 +- 9 files changed, 13 insertions(+), 12 deletions(-) diff --git a/src/components/AppNavigation/ContactsSettings.vue b/src/components/AppNavigation/ContactsSettings.vue index bb2f1d3be..a731abbc9 100644 --- a/src/components/AppNavigation/ContactsSettings.vue +++ b/src/components/AppNavigation/ContactsSettings.vue @@ -132,7 +132,7 @@ export default { this.enableSocialSyncLoading = false } }, - onLoad(event) { + onLoad() { this.$emit('file-loaded', false) }, async onOpen() { diff --git a/src/components/AppNavigation/Settings/SettingsAddressbook.vue b/src/components/AppNavigation/Settings/SettingsAddressbook.vue index 096451584..0287e0337 100644 --- a/src/components/AppNavigation/Settings/SettingsAddressbook.vue +++ b/src/components/AppNavigation/Settings/SettingsAddressbook.vue @@ -306,7 +306,7 @@ export default { renameAddressbook() { this.editingName = true }, - async updateAddressbookName(e) { + async updateAddressbookName() { const addressbook = this.addressbook // New name for addressbook - inputed value from form const newName = this.$refs.renameInput.$el.querySelector('input[type="text"]').value diff --git a/src/components/EntityPicker/ContactsPicker.vue b/src/components/EntityPicker/ContactsPicker.vue index 5fa727b93..e35813ed1 100644 --- a/src/components/EntityPicker/ContactsPicker.vue +++ b/src/components/EntityPicker/ContactsPicker.vue @@ -140,7 +140,7 @@ export default { // push contact to server and use limit requests.push(limit(() => appendContactToGroup(contact, groupName) - .then((response) => { + .then(() => { this.$store.dispatch('addContactToGroup', { contact, groupName }) this.processStatus.progress++ this.processStatus.success++ diff --git a/src/components/Properties/PropertyText.vue b/src/components/Properties/PropertyText.vue index c7a85958c..73ae88e2e 100644 --- a/src/components/Properties/PropertyText.vue +++ b/src/components/Properties/PropertyText.vue @@ -200,7 +200,7 @@ export default { /** * Watch textarea resize and update the gridSize accordingly */ - resizeHeight: debounce(function(e) { + resizeHeight: debounce(function() { if (this.$refs.textarea && this.$refs.textarea.offsetHeight) { // adjust textarea size to content (2 = border) this.$refs.textarea.style.height = `${this.$refs.textarea.scrollHeight + 2}px` diff --git a/src/models/circle.ts b/src/models/circle.ts index 97c9465b3..fc641353f 100644 --- a/src/models/circle.ts +++ b/src/models/circle.ts @@ -29,7 +29,7 @@ type MemberList = Record export default class Circle { - _data: any = {} + _data: unknown = {} _members: MemberList = {} _owner: Member _initiator: Member @@ -48,7 +48,7 @@ export default class Circle { * * @param data */ - updateData(data: any) { + updateData(data: unknown) { if (typeof data !== 'object') { throw new Error('Invalid circle') } diff --git a/src/models/constants.ts b/src/models/constants.ts index 2b621976f..830988c8c 100644 --- a/src/models/constants.ts +++ b/src/models/constants.ts @@ -59,6 +59,7 @@ const MEMBER_LEVEL_ADMIN: MemberLevel = 8 const MEMBER_LEVEL_OWNER: MemberLevel = 9 // Circles member types +/* eslint-disable-next-line @typescript-eslint/no-unused-vars */ const MEMBER_TYPE_SINGLEID: MemberType = 0 const MEMBER_TYPE_USER: MemberType = 1 const MEMBER_TYPE_GROUP : MemberType = 2 diff --git a/src/models/member.ts b/src/models/member.ts index 3713cbcd0..1b4cb2bfd 100644 --- a/src/models/member.ts +++ b/src/models/member.ts @@ -25,7 +25,7 @@ import Circle from './circle' import logger from '../services/logger.js' export default class Member { - _data: any = {} + _data: unknown = {} _circle: Circle /** @@ -34,7 +34,7 @@ export default class Member { * @param data * @param circle */ - constructor(data: any, circle: Circle) { + constructor(data: unknown, circle: Circle) { if (typeof data !== 'object') { throw new Error('Invalid member') } @@ -107,7 +107,7 @@ export default class Member { /** * Member based on source */ - get basedOn(): any { + get basedOn(): unknown { return this._data.basedOn } diff --git a/src/services/circles.ts b/src/services/circles.ts index 374b29d5e..71a65248f 100644 --- a/src/services/circles.ts +++ b/src/services/circles.ts @@ -95,11 +95,11 @@ export const deleteCircle = async function(circleId: string) { * * @param {string} circleId the circle id * @param {CircleEditType} type the edit type - * @param {any} data the data + * @param {unknown} data the data * @param value * @return {object} */ -export const editCircle = async function(circleId: string, type: CircleEditType, value: any) { +export const editCircle = async function(circleId: string, type: CircleEditType, value: unknown) { const response = await axios.put(generateOcsUrl('apps/circles/circles/{circleId}/{type}', { circleId, type }), { value }) return response.data.ocs.data } diff --git a/src/views/Contacts.vue b/src/views/Contacts.vue index 53f134e7d..5820dcb4e 100644 --- a/src/views/Contacts.vue +++ b/src/views/Contacts.vue @@ -353,7 +353,7 @@ export default { .map(addressbook => { return this.$store.dispatch('getContactsFromAddressBook', { addressbook }) }), - ).then(results => { + ).then(() => { this.loadingContacts = false if (!this.isMobile && !this.selectedChart) { this.selectFirstContactIfNone()