diff --git a/.vscode/settings.json b/.vscode/settings.json index bfde9a84..09bb4df6 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -42,6 +42,7 @@ "vue.format.style.initialIndent": true, "vue.inlayHints.inlineHandlerLeading": true, "vue.inlayHints.vBindShorthand": true, + "vue.server.hybridMode": false, "sonarlint.output.showAnalyzerLogs": true, "sonarlint.output.showVerboseLogs": true, "sonarlint.connectedMode.project": { diff --git a/frontend/.eslintrc.cjs b/frontend/.eslintrc.cjs index ff232991..7c18d2ef 100644 --- a/frontend/.eslintrc.cjs +++ b/frontend/.eslintrc.cjs @@ -4,8 +4,6 @@ const CI_environment = process.env.CI ? 0 : 1; const commonTSAndVueConfig = { extends: ['plugin:@typescript-eslint/recommended-requiring-type-checking'], rules: { - // TODO: Investigate why this rule reports false positives - '@typescript-eslint/no-misused-promises': 'off', 'no-secrets/no-secrets': 'error', '@typescript-eslint/consistent-type-exports': 'error', '@typescript-eslint/no-redundant-type-constituents': 'off' diff --git a/frontend/src/components/Layout/AppBar/SearchField.vue b/frontend/src/components/Layout/AppBar/SearchField.vue index 8439fcff..d12c99ab 100644 --- a/frontend/src/components/Layout/AppBar/SearchField.vue +++ b/frontend/src/components/Layout/AppBar/SearchField.vue @@ -22,8 +22,8 @@ const searchQuery = computed({ get(): string { return route.query.q?.toString() ?? ''; }, - async set(value) { - await router.replace({ + set(value) { + void router.replace({ ...router.currentRoute, query: { q: value.trim() || undefined diff --git a/frontend/src/composables/apis.ts b/frontend/src/composables/apis.ts index f278f774..00e43b39 100644 --- a/frontend/src/composables/apis.ts +++ b/frontend/src/composables/apis.ts @@ -303,9 +303,7 @@ function _sharedInternalLogic any>, K ex * mounted. setTimeout executes it when the event loop is clear, avoiding overwhelming the engine. */ if (isCached.value) { - window.setTimeout(async () => { - await run({ isRefresh: true }); - }); + void run({ isRefresh: true }); } if (!isCached.value && isFuncDefined()) { diff --git a/frontend/src/plugins/remote/auth/index.ts b/frontend/src/plugins/remote/auth/index.ts index e68dbc5a..83cea153 100644 --- a/frontend/src/plugins/remote/auth/index.ts +++ b/frontend/src/plugins/remote/auth/index.ts @@ -309,7 +309,7 @@ class RemotePluginAuth { } public constructor() { - window.setTimeout(async () => await this.refreshCurrentUserInfo()); + void this.refreshCurrentUserInfo(); } } diff --git a/frontend/src/plugins/router/index.ts b/frontend/src/plugins/router/index.ts index db98784b..bbe84165 100644 --- a/frontend/src/plugins/router/index.ts +++ b/frontend/src/plugins/router/index.ts @@ -61,14 +61,9 @@ router.back = (): ReturnType => { route.value.meta.transition.leave = leaveTransition; } - window.setTimeout( - async () => - await router.replace( - isStr(router.options.history.state.back) - ? router.options.history.state.back - : '/' - ) - ); + void router.replace(isStr(router.options.history.state.back) + ? router.options.history.state.back + : '/'); }; /** diff --git a/frontend/src/store/playback-manager.ts b/frontend/src/store/playback-manager.ts index b8b48100..a0d27d82 100644 --- a/frontend/src/store/playback-manager.ts +++ b/frontend/src/store/playback-manager.ts @@ -694,13 +694,7 @@ class PlaybackManagerStore extends CommonStore { this._reset(); this.currentVolume = volume; - window.setTimeout(async () => { - try { - if (sessionId && itemId && time && remote.auth.currentUser) { - await this._reportPlaybackStopped(itemId, sessionId, time); - } - } catch {} - }); + void this._reportPlaybackStopped(itemId, sessionId, time); }; /**