From 691f570237e26398aa22f40c0efca23141d5583e Mon Sep 17 00:00:00 2001 From: Ferdinand Thiessen Date: Tue, 25 Jun 2024 00:00:31 +0200 Subject: chore: Enable ESLint for apps and fix all errors Nevertheless this causes a huge amount of new warnings. Previously the shell script for directories to lint was wrong it was generating all app names to lint, but was missing the `apps/` prefix. Causing only `core` to be linted. Co-authored-by: Grigorii K. Shartsev Signed-off-by: Ferdinand Thiessen --- apps/files/src/components/FileEntryMixin.ts | 4 +++- apps/files/src/components/NavigationQuota.vue | 10 +++++----- apps/files/src/components/TransferOwnershipDialogue.vue | 6 +++--- apps/files/src/components/VirtualList.vue | 10 +++++++--- 4 files changed, 18 insertions(+), 12 deletions(-) (limited to 'apps/files/src/components') diff --git a/apps/files/src/components/FileEntryMixin.ts b/apps/files/src/components/FileEntryMixin.ts index 243b963c7b2..6c0b278c61b 100644 --- a/apps/files/src/components/FileEntryMixin.ts +++ b/apps/files/src/components/FileEntryMixin.ts @@ -7,7 +7,7 @@ import type { ComponentPublicInstance, PropType } from 'vue' import type { FileSource } from '../types.ts' import { showError } from '@nextcloud/dialogs' -import { FileType, Permission, Folder, File as NcFile, NodeStatus, Node, View } from '@nextcloud/files' +import { FileType, Permission, Folder, File as NcFile, NodeStatus, Node } from '@nextcloud/files' import { translate as t } from '@nextcloud/l10n' import { generateUrl } from '@nextcloud/router' import { vOnClickOutside } from '@vueuse/components' @@ -179,6 +179,8 @@ export default defineComponent({ /** * When the source changes, reset the preview * and fetch the new one. + * @param a + * @param b */ source(a: Node, b: Node) { if (a.source !== b.source) { diff --git a/apps/files/src/components/NavigationQuota.vue b/apps/files/src/components/NavigationQuota.vue index 9cbee4c6672..557fb240797 100644 --- a/apps/files/src/components/NavigationQuota.vue +++ b/apps/files/src/components/NavigationQuota.vue @@ -94,12 +94,12 @@ export default { mounted() { // If the user has a quota set, warn if the available account storage is <=0 // - // NOTE: This doesn't catch situations where actual *server* + // NOTE: This doesn't catch situations where actual *server* // disk (non-quota) space is low, but those should probably // be handled differently anyway since a regular user can't - // can't do much about them (If we did want to indicate server disk + // can't do much about them (If we did want to indicate server disk // space matters to users, we'd probably want to use a warning - // specific to that situation anyhow. So this covers warning covers + // specific to that situation anyhow. So this covers warning covers // our primary day-to-day concern (individual account quota usage). // if (this.storageStats?.quota > 0 && this.storageStats?.free <= 0) { @@ -121,7 +121,7 @@ export default { * Update the storage stats * Throttled at max 1 refresh per minute * - * @param {Event} [event = null] if user interaction + * @param {Event} [event] if user interaction */ async updateStorageStats(event = null) { if (this.loadingStorageStats) { @@ -135,7 +135,7 @@ export default { throw new Error('Invalid storage stats') } - // Warn the user if the available account storage changed from > 0 to 0 + // Warn the user if the available account storage changed from > 0 to 0 // (unless only because quota was intentionally set to 0 by admin in the interim) if (this.storageStats?.free > 0 && response.data.data?.free <= 0 && response.data.data?.quota > 0) { this.showStorageFullWarning() diff --git a/apps/files/src/components/TransferOwnershipDialogue.vue b/apps/files/src/components/TransferOwnershipDialogue.vue index 7c2dbd7d8e1..346bc3bbeb8 100644 --- a/apps/files/src/components/TransferOwnershipDialogue.vue +++ b/apps/files/src/components/TransferOwnershipDialogue.vue @@ -9,7 +9,7 @@

{{ readableDirectory }} - {{ t('files', 'Choose file or folder to transfer') }} @@ -22,8 +22,8 @@ - , required: true, }, dataSources: { - type: Array as PropType<(File | Folder)[]>, + type: Array as PropType, required: true, }, extraProps: { @@ -260,7 +264,7 @@ export default Vue.extend({ // Adding scroll listener AFTER the initial scroll to index this.$el.addEventListener('scroll', this.onScroll, { passive: true }) - this.$_recycledPool = {} as Record + this.$_recycledPool = {} as Record }, beforeDestroy() { -- cgit v1.2.3