[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

@@ -378,8 +378,8 @@ export const useWorkflowStore = defineStore('workflow', () => {
// Update bookmarks
if (wasBookmarked) {
bookmarkStore.setBookmarked(oldPath, false)
bookmarkStore.setBookmarked(newPath, true)
await bookmarkStore.setBookmarked(oldPath, false)
await bookmarkStore.setBookmarked(newPath, true)
}
} finally {
isBusy.value = false
@@ -391,7 +391,7 @@ export const useWorkflowStore = defineStore('workflow', () => {
try {
await workflow.delete()
if (bookmarkStore.isBookmarked(workflow.path)) {
bookmarkStore.setBookmarked(workflow.path, false)
await bookmarkStore.setBookmarked(workflow.path, false)
}
delete workflowLookup.value[workflow.path]
} finally {
@@ -462,18 +462,18 @@ export const useWorkflowBookmarkStore = defineStore('workflowBookmark', () => {
})
}
const setBookmarked = (path: string, value: boolean) => {
const setBookmarked = async (path: string, value: boolean) => {
if (bookmarks.value.has(path) === value) return
if (value) {
bookmarks.value.add(path)
} else {
bookmarks.value.delete(path)
}
saveBookmarks()
await saveBookmarks()
}
const toggleBookmarked = (path: string) => {
setBookmarked(path, !bookmarks.value.has(path))
const toggleBookmarked = async (path: string) => {
await setBookmarked(path, !bookmarks.value.has(path))
}
return {