From fc3a1e9605bfea19df32fc91f1230625eef286a2 Mon Sep 17 00:00:00 2001 From: Quentin Guillemin Date: Mon, 16 Dec 2024 16:43:10 +0100 Subject: [PATCH] style: fix eslint issues --- src/main/webapp/src/directives/index.ts | 1 + src/main/webapp/src/locales/en/index.ts | 1 + src/main/webapp/src/locales/fr/index.ts | 1 + src/main/webapp/src/plugins/date-fns.ts | 1 + src/main/webapp/src/plugins/fontawesome.ts | 1 + src/main/webapp/src/plugins/i18n.ts | 1 + src/main/webapp/src/plugins/pinia.ts | 1 + src/main/webapp/src/plugins/vuetify.ts | 3 ++- src/main/webapp/src/router/index.ts | 1 + src/main/webapp/src/services/api/configurationService.ts | 1 + src/main/webapp/src/services/api/fileService.ts | 1 + src/main/webapp/src/services/api/handshakeService.ts | 1 + src/main/webapp/src/services/api/nextcloudService.ts | 1 + src/main/webapp/src/stores/appStore.ts | 1 + src/main/webapp/src/stores/configurationStore.ts | 1 + src/main/webapp/src/stores/fileStore.ts | 1 + src/main/webapp/src/stores/homeStore.ts | 1 + src/main/webapp/src/types/collaborationType.ts | 1 + src/main/webapp/src/types/configurationType.ts | 1 + src/main/webapp/src/types/fileType.ts | 1 + src/main/webapp/src/utils/axiosUtils.ts | 3 ++- src/main/webapp/src/utils/dateFnsUtils.ts | 1 + src/main/webapp/src/utils/entUtils.ts | 1 + src/main/webapp/src/utils/fileUtils.ts | 1 + src/main/webapp/src/utils/nextcloudUtils.ts | 1 + src/main/webapp/src/utils/routerUtils.ts | 1 + src/test/webapp/e2e/vue.spec.ts | 1 + .../spec/components/dialogs/confirmationDialog.spec.ts | 5 +++-- src/test/webapp/spec/components/dialogs/fileDialog.spec.ts | 7 ++++--- .../webapp/spec/components/dialogs/loginDialog.spec.ts | 5 +++-- src/test/webapp/spec/components/dialogs/roomDialog.spec.ts | 7 ++++--- .../webapp/spec/components/dialogs/settingsDialog.spec.ts | 5 +++-- .../spec/components/dialogs/shareInRoomDialog.spec.ts | 5 +++-- src/test/webapp/spec/components/durationSpan.spec.ts | 5 +++-- src/test/webapp/spec/config/index.ts | 1 + src/test/webapp/spec/config/samples/assocatedAppSamples.ts | 1 + src/test/webapp/spec/config/samples/fileSamples.ts | 5 +++-- src/test/webapp/spec/config/samples/userSamples.ts | 1 + src/test/webapp/spec/plugins/i18n.spec.ts | 1 + src/test/webapp/spec/stores/homeStore.spec.ts | 3 ++- src/test/webapp/spec/utils/stringUtils.spec.ts | 1 + 41 files changed, 62 insertions(+), 21 deletions(-) diff --git a/src/main/webapp/src/directives/index.ts b/src/main/webapp/src/directives/index.ts index a11f1581..9890e1ee 100644 --- a/src/main/webapp/src/directives/index.ts +++ b/src/main/webapp/src/directives/index.ts @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + import type { App } from 'vue' // eslint-disable-next-line unused-imports/no-unused-vars diff --git a/src/main/webapp/src/locales/en/index.ts b/src/main/webapp/src/locales/en/index.ts index 15e1f278..651be95f 100644 --- a/src/main/webapp/src/locales/en/index.ts +++ b/src/main/webapp/src/locales/en/index.ts @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + import { en } from 'vuetify/locale' import alerts from './alerts.json' import applications from './applications.json' diff --git a/src/main/webapp/src/locales/fr/index.ts b/src/main/webapp/src/locales/fr/index.ts index b6a4a571..ba079b8d 100644 --- a/src/main/webapp/src/locales/fr/index.ts +++ b/src/main/webapp/src/locales/fr/index.ts @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + import { fr } from 'vuetify/locale' import alerts from './alerts.json' import applications from './applications.json' diff --git a/src/main/webapp/src/plugins/date-fns.ts b/src/main/webapp/src/plugins/date-fns.ts index edeabfbd..1e14d3ca 100644 --- a/src/main/webapp/src/plugins/date-fns.ts +++ b/src/main/webapp/src/plugins/date-fns.ts @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + import { setDefaultOptions } from 'date-fns' import { fr } from 'date-fns/locale' diff --git a/src/main/webapp/src/plugins/fontawesome.ts b/src/main/webapp/src/plugins/fontawesome.ts index 2ad15acf..ae5008da 100644 --- a/src/main/webapp/src/plugins/fontawesome.ts +++ b/src/main/webapp/src/plugins/fontawesome.ts @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + import type { App } from 'vue' import { library } from '@fortawesome/fontawesome-svg-core' import { diff --git a/src/main/webapp/src/plugins/i18n.ts b/src/main/webapp/src/plugins/i18n.ts index e51eb284..9bafb15f 100644 --- a/src/main/webapp/src/plugins/i18n.ts +++ b/src/main/webapp/src/plugins/i18n.ts @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + import * as messages from '@/locales' import { createI18n } from 'vue-i18n' diff --git a/src/main/webapp/src/plugins/pinia.ts b/src/main/webapp/src/plugins/pinia.ts index d110ff89..407a6b33 100644 --- a/src/main/webapp/src/plugins/pinia.ts +++ b/src/main/webapp/src/plugins/pinia.ts @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + import { useAppStore, useConfigurationStore, useFileStore, useHomeStore } from '@/stores' import { acceptHMRUpdate, createPinia } from 'pinia' diff --git a/src/main/webapp/src/plugins/vuetify.ts b/src/main/webapp/src/plugins/vuetify.ts index 5f6cfa05..4f549f10 100644 --- a/src/main/webapp/src/plugins/vuetify.ts +++ b/src/main/webapp/src/plugins/vuetify.ts @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import i18n from '@/plugins/i18n.ts' + import { Theme } from '@/types/enums' import DateFnsAdapter from '@date-io/date-fns' import { enUS, fr } from 'date-fns/locale' @@ -22,6 +22,7 @@ import { createVuetify, type ThemeDefinition } from 'vuetify' import { md3 } from 'vuetify/blueprints' import { aliases, fa } from 'vuetify/iconsets/fa-svg' import { createVueI18nAdapter } from 'vuetify/locale/adapters/vue-i18n' +import i18n from './i18n.ts' const themes: Record = { [Theme.light]: { diff --git a/src/main/webapp/src/router/index.ts b/src/main/webapp/src/router/index.ts index 7c7d9bff..b0f8be6d 100644 --- a/src/main/webapp/src/router/index.ts +++ b/src/main/webapp/src/router/index.ts @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + import { Navigation } from '@/types/enums' import { redirect } from '@/utils' import { createRouter, createWebHistory } from 'vue-router' diff --git a/src/main/webapp/src/services/api/configurationService.ts b/src/main/webapp/src/services/api/configurationService.ts index b781caa2..4219fd3f 100644 --- a/src/main/webapp/src/services/api/configurationService.ts +++ b/src/main/webapp/src/services/api/configurationService.ts @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + import { axiosInstance as axios } from '@/utils' const getConfiguration = async () => await axios.get('/api/config') diff --git a/src/main/webapp/src/services/api/fileService.ts b/src/main/webapp/src/services/api/fileService.ts index efbb922c..98887df5 100644 --- a/src/main/webapp/src/services/api/fileService.ts +++ b/src/main/webapp/src/services/api/fileService.ts @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + import type { CollaborationBody, FileBody, HistoryBody, MetadataBody } from '@/types' import { axiosInstance as axios } from '@/utils' diff --git a/src/main/webapp/src/services/api/handshakeService.ts b/src/main/webapp/src/services/api/handshakeService.ts index 65d94d1c..c1f7b220 100644 --- a/src/main/webapp/src/services/api/handshakeService.ts +++ b/src/main/webapp/src/services/api/handshakeService.ts @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + import { axiosInstance as axios } from '@/utils' const handshake = async () => await axios.get('/api/handshake') diff --git a/src/main/webapp/src/services/api/nextcloudService.ts b/src/main/webapp/src/services/api/nextcloudService.ts index c2864268..8db25629 100644 --- a/src/main/webapp/src/services/api/nextcloudService.ts +++ b/src/main/webapp/src/services/api/nextcloudService.ts @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + import { ncInstance as axios } from '@/utils' const getNcFile = async (userID: string, fileUri: string) => await axios.get(`${userID}/${fileUri}`) diff --git a/src/main/webapp/src/stores/appStore.ts b/src/main/webapp/src/stores/appStore.ts index 6b3ba4da..95b10979 100644 --- a/src/main/webapp/src/stores/appStore.ts +++ b/src/main/webapp/src/stores/appStore.ts @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + /* eslint-disable ts/no-use-before-define */ import { interpolate } from '@/utils' import { useSessionStorage } from '@vueuse/core' diff --git a/src/main/webapp/src/stores/configurationStore.ts b/src/main/webapp/src/stores/configurationStore.ts index fbfca9cc..3569f7bf 100644 --- a/src/main/webapp/src/stores/configurationStore.ts +++ b/src/main/webapp/src/stores/configurationStore.ts @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + /* eslint-disable ts/no-use-before-define */ import type { AssociatedApp, Configuration, Soffit } from '@/types' import { getConfiguration } from '@/services/api' diff --git a/src/main/webapp/src/stores/fileStore.ts b/src/main/webapp/src/stores/fileStore.ts index 3741663b..d27f1308 100644 --- a/src/main/webapp/src/stores/fileStore.ts +++ b/src/main/webapp/src/stores/fileStore.ts @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + /* eslint-disable ts/no-use-before-define */ import type { File, FileBody } from '@/types' import { getFile, getFiles, getPublic, getShared, getStarred } from '@/services/api' diff --git a/src/main/webapp/src/stores/homeStore.ts b/src/main/webapp/src/stores/homeStore.ts index 196eaca6..034e8d2d 100644 --- a/src/main/webapp/src/stores/homeStore.ts +++ b/src/main/webapp/src/stores/homeStore.ts @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + import { Tabs } from '@/types/enums' import { useSessionStorage } from '@vueuse/core' import { defineStore, storeToRefs } from 'pinia' diff --git a/src/main/webapp/src/types/collaborationType.ts b/src/main/webapp/src/types/collaborationType.ts index 444cc28c..e9b23141 100644 --- a/src/main/webapp/src/types/collaborationType.ts +++ b/src/main/webapp/src/types/collaborationType.ts @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + import type { User } from './userType.ts' export interface Collaboration { diff --git a/src/main/webapp/src/types/configurationType.ts b/src/main/webapp/src/types/configurationType.ts index 1687645a..e3206ea0 100644 --- a/src/main/webapp/src/types/configurationType.ts +++ b/src/main/webapp/src/types/configurationType.ts @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + import type { AssociatedApp } from './associatedAppType.ts' export interface Configuration { diff --git a/src/main/webapp/src/types/fileType.ts b/src/main/webapp/src/types/fileType.ts index 91615b28..e8d6d8e0 100644 --- a/src/main/webapp/src/types/fileType.ts +++ b/src/main/webapp/src/types/fileType.ts @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + import type { AssociatedApp } from './associatedAppType.ts' import type { Collaboration } from './collaborationType.ts' import type { History } from './historyType.ts' diff --git a/src/main/webapp/src/utils/axiosUtils.ts b/src/main/webapp/src/utils/axiosUtils.ts index df30f9d1..cb13415c 100644 --- a/src/main/webapp/src/utils/axiosUtils.ts +++ b/src/main/webapp/src/utils/axiosUtils.ts @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + import i18n from '@/plugins/i18n.ts' import { handshake } from '@/services/api' import { useConfigurationStore } from '@/stores' @@ -108,4 +109,4 @@ function errorHandler(e: any, toastOrI18n?: boolean | string): void { console.error(error) } -export { errorHandler, initToken, instance as axiosInstance } +export { instance as axiosInstance, errorHandler, initToken } diff --git a/src/main/webapp/src/utils/dateFnsUtils.ts b/src/main/webapp/src/utils/dateFnsUtils.ts index 2e7c60c8..c850a6be 100644 --- a/src/main/webapp/src/utils/dateFnsUtils.ts +++ b/src/main/webapp/src/utils/dateFnsUtils.ts @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + import { type Duration, formatDuration, intervalToDuration } from 'date-fns' type dateType = string | number | Date diff --git a/src/main/webapp/src/utils/entUtils.ts b/src/main/webapp/src/utils/entUtils.ts index b4c32066..fa2d2108 100644 --- a/src/main/webapp/src/utils/entUtils.ts +++ b/src/main/webapp/src/utils/entUtils.ts @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + import type { PortalEntry } from '@/types' import vuetify from '@/plugins/vuetify.ts' import axios from 'axios' diff --git a/src/main/webapp/src/utils/fileUtils.ts b/src/main/webapp/src/utils/fileUtils.ts index 92901d70..72b538b1 100644 --- a/src/main/webapp/src/utils/fileUtils.ts +++ b/src/main/webapp/src/utils/fileUtils.ts @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + import type { File as cFile } from '@/types' function downloadFileOrBlob(fileOrBlob: File | Blob, filename: string): void { diff --git a/src/main/webapp/src/utils/nextcloudUtils.ts b/src/main/webapp/src/utils/nextcloudUtils.ts index 47b4cd79..57a77804 100644 --- a/src/main/webapp/src/utils/nextcloudUtils.ts +++ b/src/main/webapp/src/utils/nextcloudUtils.ts @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + import i18n from '@/plugins/i18n.ts' import { saveNcFile } from '@/services/api' import { useConfigurationStore } from '@/stores' diff --git a/src/main/webapp/src/utils/routerUtils.ts b/src/main/webapp/src/utils/routerUtils.ts index 79d99dc4..18b35204 100644 --- a/src/main/webapp/src/utils/routerUtils.ts +++ b/src/main/webapp/src/utils/routerUtils.ts @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + import type { AssociatedApp } from '@/types' import type { Router, RouteRecordRaw, RouteRecordRedirectOption } from 'vue-router' import { Navigation } from '@/types/enums' diff --git a/src/test/webapp/e2e/vue.spec.ts b/src/test/webapp/e2e/vue.spec.ts index 773e2401..15762235 100644 --- a/src/test/webapp/e2e/vue.spec.ts +++ b/src/test/webapp/e2e/vue.spec.ts @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + import assert from 'node:assert' import { expect, test } from '@playwright/test' import 'dotenv/config' diff --git a/src/test/webapp/spec/components/dialogs/confirmationDialog.spec.ts b/src/test/webapp/spec/components/dialogs/confirmationDialog.spec.ts index 16baacfd..b90d7dcb 100644 --- a/src/test/webapp/spec/components/dialogs/confirmationDialog.spec.ts +++ b/src/test/webapp/spec/components/dialogs/confirmationDialog.spec.ts @@ -13,14 +13,15 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + import type { VueWrapper } from '@vue/test-utils' -import { ResizeObserver } from '@juggle/resize-observer' -import { plugins } from '../../config/index.ts' // @ts-expect-error project location import ConfirmationDialog from '@/components/dialogs/ConfirmationDialog.vue' +import { ResizeObserver } from '@juggle/resize-observer' import { mount } from '@vue/test-utils' import { afterEach, beforeEach, describe, expect, it } from 'vitest' import { VBtn, VCardText } from 'vuetify/components' +import { plugins } from '../../config/index.ts' globalThis.ResizeObserver = ResizeObserver diff --git a/src/test/webapp/spec/components/dialogs/fileDialog.spec.ts b/src/test/webapp/spec/components/dialogs/fileDialog.spec.ts index f780bb7a..64f5dc28 100644 --- a/src/test/webapp/spec/components/dialogs/fileDialog.spec.ts +++ b/src/test/webapp/spec/components/dialogs/fileDialog.spec.ts @@ -13,17 +13,18 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + import type { VueWrapper } from '@vue/test-utils' -import { ResizeObserver } from '@juggle/resize-observer' -import { FontAwesomeIcon, plugins, registerFontAwsome } from '../../config/index.ts' -import { associatedApp1, associatedApp2 } from '../../config/samples.ts' // @ts-expect-error project location import FileDialog from '@/components/dialogs/FileDialog.vue' // @ts-expect-error project location import { useConfigurationStore, useHomeStore } from '@/stores' +import { ResizeObserver } from '@juggle/resize-observer' import { createTestingPinia } from '@pinia/testing' import { mount } from '@vue/test-utils' import { afterEach, beforeAll, beforeEach, describe, expect, it } from 'vitest' +import { FontAwesomeIcon, plugins, registerFontAwsome } from '../../config/index.ts' +import { associatedApp1, associatedApp2 } from '../../config/samples.ts' globalThis.ResizeObserver = ResizeObserver diff --git a/src/test/webapp/spec/components/dialogs/loginDialog.spec.ts b/src/test/webapp/spec/components/dialogs/loginDialog.spec.ts index 5de3063c..e5be0f0c 100644 --- a/src/test/webapp/spec/components/dialogs/loginDialog.spec.ts +++ b/src/test/webapp/spec/components/dialogs/loginDialog.spec.ts @@ -13,16 +13,17 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + import type { VueWrapper } from '@vue/test-utils' -import { ResizeObserver } from '@juggle/resize-observer' -import { FontAwesomeIcon, plugins, registerFontAwsome } from '../../config/index.ts' // @ts-expect-error project location import LoginDialog from '@/components/dialogs/LoginDialog.vue' // @ts-expect-error project location import { useConfigurationStore } from '@/stores' +import { ResizeObserver } from '@juggle/resize-observer' import { createTestingPinia } from '@pinia/testing' import { mount } from '@vue/test-utils' import { afterEach, beforeAll, beforeEach, describe, expect, it } from 'vitest' +import { FontAwesomeIcon, plugins, registerFontAwsome } from '../../config/index.ts' globalThis.ResizeObserver = ResizeObserver diff --git a/src/test/webapp/spec/components/dialogs/roomDialog.spec.ts b/src/test/webapp/spec/components/dialogs/roomDialog.spec.ts index 4b223e2a..cdc15710 100644 --- a/src/test/webapp/spec/components/dialogs/roomDialog.spec.ts +++ b/src/test/webapp/spec/components/dialogs/roomDialog.spec.ts @@ -13,17 +13,18 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + import type { VueWrapper } from '@vue/test-utils' -import { ResizeObserver } from '@juggle/resize-observer' -import { FontAwesomeIcon, plugins, registerFontAwsome } from '../../config/index.ts' -import { associatedApp1, associatedApp2 } from '../../config/samples.ts' // @ts-expect-error project location import RoomDialog from '@/components/dialogs/RoomDialog.vue' // @ts-expect-error project location import { useConfigurationStore, useHomeStore } from '@/stores' +import { ResizeObserver } from '@juggle/resize-observer' import { createTestingPinia } from '@pinia/testing' import { flushPromises, mount } from '@vue/test-utils' import { afterEach, beforeAll, beforeEach, describe, expect, it } from 'vitest' +import { FontAwesomeIcon, plugins, registerFontAwsome } from '../../config/index.ts' +import { associatedApp1, associatedApp2 } from '../../config/samples.ts' globalThis.ResizeObserver = ResizeObserver diff --git a/src/test/webapp/spec/components/dialogs/settingsDialog.spec.ts b/src/test/webapp/spec/components/dialogs/settingsDialog.spec.ts index d59b553c..cbc2931f 100644 --- a/src/test/webapp/spec/components/dialogs/settingsDialog.spec.ts +++ b/src/test/webapp/spec/components/dialogs/settingsDialog.spec.ts @@ -13,16 +13,17 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + import type { VueWrapper } from '@vue/test-utils' -import { ResizeObserver } from '@juggle/resize-observer' -import { FontAwesomeIcon, plugins, registerFontAwsome } from '../../config/index.ts' // @ts-expect-error project location import SettingsDialog from '@/components/dialogs/SettingsDialog.vue' // @ts-expect-error project location import { useConfigurationStore } from '@/stores' +import { ResizeObserver } from '@juggle/resize-observer' import { createTestingPinia } from '@pinia/testing' import { flushPromises, mount } from '@vue/test-utils' import { afterEach, beforeAll, beforeEach, describe, expect, it } from 'vitest' +import { FontAwesomeIcon, plugins, registerFontAwsome } from '../../config/index.ts' globalThis.ResizeObserver = ResizeObserver diff --git a/src/test/webapp/spec/components/dialogs/shareInRoomDialog.spec.ts b/src/test/webapp/spec/components/dialogs/shareInRoomDialog.spec.ts index 65206e1f..fb673a6c 100644 --- a/src/test/webapp/spec/components/dialogs/shareInRoomDialog.spec.ts +++ b/src/test/webapp/spec/components/dialogs/shareInRoomDialog.spec.ts @@ -13,16 +13,17 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + import type { VueWrapper } from '@vue/test-utils' -import { ResizeObserver } from '@juggle/resize-observer' -import { FontAwesomeIcon, plugins, registerFontAwsome } from '../../config/index.ts' // @ts-expect-error project location import ShareInRoomDialog from '@/components/dialogs/ShareInRoomDialog.vue' // @ts-expect-error project location import { useAppStore, useConfigurationStore, useHomeStore } from '@/stores' +import { ResizeObserver } from '@juggle/resize-observer' import { createTestingPinia } from '@pinia/testing' import { flushPromises, mount } from '@vue/test-utils' import { afterEach, beforeAll, beforeEach, describe, expect, it } from 'vitest' +import { FontAwesomeIcon, plugins, registerFontAwsome } from '../../config/index.ts' globalThis.ResizeObserver = ResizeObserver diff --git a/src/test/webapp/spec/components/durationSpan.spec.ts b/src/test/webapp/spec/components/durationSpan.spec.ts index 0dd33b5b..b6d32235 100644 --- a/src/test/webapp/spec/components/durationSpan.spec.ts +++ b/src/test/webapp/spec/components/durationSpan.spec.ts @@ -13,13 +13,14 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + import type { VueWrapper } from '@vue/test-utils' -import { ResizeObserver } from '@juggle/resize-observer' -import { plugins } from '../config/index.ts' // @ts-expect-error project location import DurationSpan from '@/components/DurationSpan.vue' +import { ResizeObserver } from '@juggle/resize-observer' import { mount } from '@vue/test-utils' import { beforeEach, describe, expect, it } from 'vitest' +import { plugins } from '../config/index.ts' globalThis.ResizeObserver = ResizeObserver diff --git a/src/test/webapp/spec/config/index.ts b/src/test/webapp/spec/config/index.ts index ab485288..8a87836e 100644 --- a/src/test/webapp/spec/config/index.ts +++ b/src/test/webapp/spec/config/index.ts @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + // @ts-expect-error project location import { register as registerFontAwsome } from '@/plugins/fontawesome.ts' // @ts-expect-error project location diff --git a/src/test/webapp/spec/config/samples/assocatedAppSamples.ts b/src/test/webapp/spec/config/samples/assocatedAppSamples.ts index dec25ea5..5dbbe967 100644 --- a/src/test/webapp/spec/config/samples/assocatedAppSamples.ts +++ b/src/test/webapp/spec/config/samples/assocatedAppSamples.ts @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + // @ts-expect-error project location import type { AssociatedApp } from '@/types' diff --git a/src/test/webapp/spec/config/samples/fileSamples.ts b/src/test/webapp/spec/config/samples/fileSamples.ts index 395c7dc7..3da2e3c2 100644 --- a/src/test/webapp/spec/config/samples/fileSamples.ts +++ b/src/test/webapp/spec/config/samples/fileSamples.ts @@ -13,10 +13,11 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import { associatedApp1 } from './assocatedAppSamples.ts' -import { user1, user2, user3 } from './userSamples.ts' + // @ts-expect-error project location import type { File } from '@/types' +import { associatedApp1 } from './assocatedAppSamples.ts' +import { user1, user2, user3 } from './userSamples.ts' const date = '2024-07-15 17:50:00.000' diff --git a/src/test/webapp/spec/config/samples/userSamples.ts b/src/test/webapp/spec/config/samples/userSamples.ts index 2a433174..ce75d2b5 100644 --- a/src/test/webapp/spec/config/samples/userSamples.ts +++ b/src/test/webapp/spec/config/samples/userSamples.ts @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + // @ts-expect-error project location import type { User } from '@/types' diff --git a/src/test/webapp/spec/plugins/i18n.spec.ts b/src/test/webapp/spec/plugins/i18n.spec.ts index c50138ad..2c1d0684 100644 --- a/src/test/webapp/spec/plugins/i18n.spec.ts +++ b/src/test/webapp/spec/plugins/i18n.spec.ts @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + import { ResizeObserver } from '@juggle/resize-observer' import { mount } from '@vue/test-utils' import { describe, expect, it } from 'vitest' diff --git a/src/test/webapp/spec/stores/homeStore.spec.ts b/src/test/webapp/spec/stores/homeStore.spec.ts index 519b3da9..98f0e66b 100644 --- a/src/test/webapp/spec/stores/homeStore.spec.ts +++ b/src/test/webapp/spec/stores/homeStore.spec.ts @@ -13,13 +13,14 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import { file1 } from '../config/samples.ts' + // @ts-expect-error project location import { useFileStore, useHomeStore } from '@/stores' // @ts-expect-error project location import { Tabs } from '@/types/enums' import { createPinia, setActivePinia, storeToRefs } from 'pinia' import { beforeEach, describe, expect, it } from 'vitest' +import { file1 } from '../config/samples.ts' describe('homeStore', () => { beforeEach(() => { diff --git a/src/test/webapp/spec/utils/stringUtils.spec.ts b/src/test/webapp/spec/utils/stringUtils.spec.ts index 2b53a297..be75ca1b 100644 --- a/src/test/webapp/spec/utils/stringUtils.spec.ts +++ b/src/test/webapp/spec/utils/stringUtils.spec.ts @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + // @ts-expect-error project location import { charOTP, interpolate, slugify } from '@/utils' import { describe, expect, it } from 'vitest'