Skip to content

Commit

Permalink
style: fix eslint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Quentin-Guillemin committed Dec 16, 2024
1 parent ed0195d commit fc3a1e9
Show file tree
Hide file tree
Showing 41 changed files with 62 additions and 21 deletions.
1 change: 1 addition & 0 deletions src/main/webapp/src/directives/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions src/main/webapp/src/locales/en/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
1 change: 1 addition & 0 deletions src/main/webapp/src/locales/fr/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
1 change: 1 addition & 0 deletions src/main/webapp/src/plugins/date-fns.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand Down
1 change: 1 addition & 0 deletions src/main/webapp/src/plugins/fontawesome.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
1 change: 1 addition & 0 deletions src/main/webapp/src/plugins/i18n.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand Down
1 change: 1 addition & 0 deletions src/main/webapp/src/plugins/pinia.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand Down
3 changes: 2 additions & 1 deletion src/main/webapp/src/plugins/vuetify.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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<string, ThemeDefinition> = {
[Theme.light]: {
Expand Down
1 change: 1 addition & 0 deletions src/main/webapp/src/router/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
1 change: 1 addition & 0 deletions src/main/webapp/src/services/api/configurationService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down
1 change: 1 addition & 0 deletions src/main/webapp/src/services/api/fileService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand Down
1 change: 1 addition & 0 deletions src/main/webapp/src/services/api/handshakeService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down
1 change: 1 addition & 0 deletions src/main/webapp/src/services/api/nextcloudService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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}`)
Expand Down
1 change: 1 addition & 0 deletions src/main/webapp/src/stores/appStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
1 change: 1 addition & 0 deletions src/main/webapp/src/stores/configurationStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
1 change: 1 addition & 0 deletions src/main/webapp/src/stores/fileStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
1 change: 1 addition & 0 deletions src/main/webapp/src/stores/homeStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
1 change: 1 addition & 0 deletions src/main/webapp/src/types/collaborationType.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
1 change: 1 addition & 0 deletions src/main/webapp/src/types/configurationType.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
1 change: 1 addition & 0 deletions src/main/webapp/src/types/fileType.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
3 changes: 2 additions & 1 deletion src/main/webapp/src/utils/axiosUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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 }
1 change: 1 addition & 0 deletions src/main/webapp/src/utils/dateFnsUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions src/main/webapp/src/utils/entUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
1 change: 1 addition & 0 deletions src/main/webapp/src/utils/fileUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
1 change: 1 addition & 0 deletions src/main/webapp/src/utils/nextcloudUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
1 change: 1 addition & 0 deletions src/main/webapp/src/utils/routerUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
1 change: 1 addition & 0 deletions src/test/webapp/e2e/vue.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
7 changes: 4 additions & 3 deletions src/test/webapp/spec/components/dialogs/fileDialog.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
5 changes: 3 additions & 2 deletions src/test/webapp/spec/components/dialogs/loginDialog.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
7 changes: 4 additions & 3 deletions src/test/webapp/spec/components/dialogs/roomDialog.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
5 changes: 3 additions & 2 deletions src/test/webapp/spec/components/durationSpan.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
1 change: 1 addition & 0 deletions src/test/webapp/spec/config/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions src/test/webapp/spec/config/samples/assocatedAppSamples.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand Down
5 changes: 3 additions & 2 deletions src/test/webapp/spec/config/samples/fileSamples.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand Down
Loading

0 comments on commit fc3a1e9

Please sign in to comment.