diff --git a/front/package.json b/front/package.json index 666a8ca7c..5a7cbff82 100644 --- a/front/package.json +++ b/front/package.json @@ -66,17 +66,17 @@ "@types/jquery": "3.5.29", "@types/lodash-es": "4.17.12", "@types/moxios": "0.4.17", - "@types/qs": "6.9.10", + "@types/qs": "6.9.12", "@types/semantic-ui": "2.2.9", "@types/showdown": "2.0.6", "@types/vue-virtual-scroller": "npm:@earltp/vue-virtual-scroller", - "@typescript-eslint/eslint-plugin": "7.1.0", + "@typescript-eslint/eslint-plugin": "7.2.0", "@vitejs/plugin-vue": "5.0.4", "@vitest/coverage-v8": "1.3.1", "@vue-macros/volar": "0.18.11", "@vue/compiler-sfc": "3.4.21", "@vue/eslint-config-standard": "8.0.1", - "@vue/eslint-config-typescript": "12.0.0", + "@vue/eslint-config-typescript": "13.0.0", "@vue/test-utils": "2.4.5", "@vue/tsconfig": "0.5.1", "cypress": "13.6.4", @@ -87,7 +87,7 @@ "eslint-plugin-n": "16.6.2", "eslint-plugin-node": "11.1.0", "eslint-plugin-promise": "6.1.1", - "eslint-plugin-vue": "9.22.0", + "eslint-plugin-vue": "9.23.0", "jsdom": "24.0.0", "jsonc-eslint-parser": "2.4.0", "msw": "2.2.1", @@ -97,9 +97,8 @@ "rollup-plugin-visualizer": "5.9.0", "sass": "1.57.1", "standardized-audio-context-mock": "9.7.2", - "typescript": "5.3.3", + "typescript": "5.4.2", "unplugin-vue-macros": "2.7.10", - "utility-types": "3.10.0", "vite": "5.1.3", "vitest": "1.3.1", "vue-tsc": "2.0.6", diff --git a/front/src/api/player.ts b/front/src/api/player.ts index 97b91a851..530526427 100644 --- a/front/src/api/player.ts +++ b/front/src/api/player.ts @@ -38,9 +38,9 @@ export interface Sound { onSoundEnd: EventHookOn } -export const soundImplementations = reactive(new Set>()) +export const soundImplementations: Set> = reactive(new Set>()) -export const registerSoundImplementation = >(implementation: T) => { +export const registerSoundImplementation = (implementation: Constructor): Constructor => { soundImplementations.add(implementation) return implementation } @@ -49,8 +49,8 @@ export const registerSoundImplementation = >(implem @registerSoundImplementation export class HTMLSound implements Sound { #audio = new Audio() - #soundLoopEventHook = createEventHook() - #soundEndEventHook = createEventHook() + #soundLoopEventHook = createEventHook() + #soundEndEventHook = createEventHook() #ignoreError = false #scope = effectScope() @@ -59,8 +59,8 @@ export class HTMLSound implements Sound { readonly isDisposed = ref(false) audioNode = createAudioSource(this.#audio) - onSoundLoop: EventHookOn - onSoundEnd: EventHookOn + onSoundLoop: EventHookOn + onSoundEnd: EventHookOn constructor (sources: SoundSource[]) { this.onSoundLoop = this.#soundLoopEventHook.on diff --git a/front/src/components/Queue.vue b/front/src/components/Queue.vue index 95edf14e1..e320a803b 100644 --- a/front/src/components/Queue.vue +++ b/front/src/components/Queue.vue @@ -83,6 +83,7 @@ watchEffect(async () => { const list = ref() const el = useCurrentElement() const scrollToCurrent = (behavior: ScrollBehavior = 'smooth') => { + if (!(el.value instanceof HTMLElement)) return const item = el.value?.querySelector('.queue-item.active') item?.scrollIntoView({ behavior, @@ -275,7 +276,7 @@ if (!isWebGLSupported) {

{{ currentTrack.title }} @@ -301,7 +302,7 @@ if (!isWebGLSupported) {

{{ $t('components.Queue.header.failure') }} @@ -316,7 +317,7 @@ if (!isWebGLSupported) {

{{ $t('components.Queue.header.noSources') }} diff --git a/front/src/components/audio/SearchBar.vue b/front/src/components/audio/SearchBar.vue index 662b5c810..147400854 100644 --- a/front/src/components/audio/SearchBar.vue +++ b/front/src/components/audio/SearchBar.vue @@ -64,6 +64,7 @@ const el = useCurrentElement() const query = ref() const enter = () => { + if (!(el.value instanceof HTMLElement)) return jQuery(el.value).search('cancel query') // Cancel any API search request to backend… @@ -113,7 +114,7 @@ const categories = computed(() => [ name: labels.value.tag, getId: (obj: Tag) => obj.name, getTitle: (obj: Tag) => `#${obj.name}`, - getDescription: (obj: Tag) => '' + getDescription: (_: Tag) => '' }, { code: 'more', @@ -132,6 +133,7 @@ const objectId = computed(() => { }) onMounted(() => { + if (!(el.value instanceof HTMLElement)) return jQuery(el.value).search({ type: 'category', minCharacters: 3, @@ -142,13 +144,14 @@ onMounted(() => { noResults: t('components.audio.SearchBar.empty.noResults') }, - onSelect (result, response) { + onSelect (result, _response) { + if (!(el.value instanceof HTMLElement)) return jQuery(el.value).search('set value', query.value) router.push(result.routerUrl) jQuery(el.value).search('hide results') return false }, - onSearchQuery (value) { + onSearchQuery (_value) { // query.value = value emit('search') }, diff --git a/front/src/components/auth/Settings.vue b/front/src/components/auth/Settings.vue index 5bf347638..4c55fcf7a 100644 --- a/front/src/components/auth/Settings.vue +++ b/front/src/components/auth/Settings.vue @@ -1,6 +1,5 @@