[lint] Enforce @typescript-eslint/no-floating-promises (#3402)

This commit is contained in:
Chenlei Hu
2025-04-11 12:19:22 -04:00
committed by GitHub
parent 59e20964a0
commit dc5d7ea1be
60 changed files with 305 additions and 279 deletions

View File

@@ -51,9 +51,9 @@ const openGitDownloads = () => {
window.open('https://git-scm.com/downloads/', '_blank')
}
const skipGit = () => {
const skipGit = async () => {
console.warn('pushing')
const router = useRouter()
router.push('install')
await router.push('install')
}
</script>

View File

@@ -230,10 +230,12 @@ const onGraphReady = () => {
)
// Load model folders
wrapWithErrorHandlingAsync(useModelStore().loadModelFolders)()
void wrapWithErrorHandlingAsync(useModelStore().loadModelFolders)()
// Non-blocking load of node frequencies
wrapWithErrorHandlingAsync(useNodeFrequencyStore().loadNodeFrequencies)()
void wrapWithErrorHandlingAsync(
useNodeFrequencyStore().loadNodeFrequencies
)()
// Node defs now available after comfyApp.setup.
// Explicitly initialize nodeSearchService to avoid indexing delay when

View File

@@ -166,7 +166,7 @@ const noGpu = computed(() => typeof device.value !== 'string')
const electron = electronAPI()
const router = useRouter()
const install = () => {
const install = async () => {
const options: InstallOptions = {
installPath: installPath.value,
autoUpdate: autoUpdate.value,
@@ -183,7 +183,7 @@ const install = () => {
const nextPage =
options.device === 'unsupported' ? '/manual-configuration' : '/server-start'
router.push(nextPage)
await router.push(nextPage)
}
onMounted(async () => {

View File

@@ -78,6 +78,6 @@ const updateConsent = async () => {
} finally {
isUpdating.value = false
}
router.push('/')
await router.push('/')
}
</script>

View File

@@ -73,8 +73,8 @@ const reportIssue = () => {
}
const router = useRouter()
const continueToInstall = () => {
router.push('/install')
const continueToInstall = async () => {
await router.push('/install')
}
</script>

View File

@@ -76,8 +76,8 @@ const login = async () => {
throw new Error('No user selected')
}
userStore.login(user)
router.push('/')
await userStore.login(user)
await router.push('/')
} catch (err) {
loginError.value = err instanceof Error ? err.message : JSON.stringify(err)
}

View File

@@ -27,8 +27,8 @@ import { useRouter } from 'vue-router'
import BaseViewTemplate from '@/views/templates/BaseViewTemplate.vue'
const router = useRouter()
const navigateTo = (path: string) => {
router.push(path)
const navigateTo = async (path: string) => {
await router.push(path)
}
</script>