[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

@@ -211,14 +211,14 @@ watchEffect(() => {
}
})
function removeKeybinding(commandData: ICommandData) {
async function removeKeybinding(commandData: ICommandData) {
if (commandData.keybinding) {
keybindingStore.unsetKeybinding(commandData.keybinding)
keybindingService.persistUserKeybindings()
await keybindingService.persistUserKeybindings()
}
}
function captureKeybinding(event: KeyboardEvent) {
async function captureKeybinding(event: KeyboardEvent) {
// Allow the use of keyboard shortcuts when adding keyboard shortcuts
if (!event.shiftKey && !event.altKey && !event.ctrlKey && !event.metaKey) {
switch (event.key) {
@@ -226,7 +226,7 @@ function captureKeybinding(event: KeyboardEvent) {
cancelEdit()
return
case 'Enter':
saveKeybinding()
await saveKeybinding()
return
}
}
@@ -240,7 +240,7 @@ function cancelEdit() {
newBindingKeyCombo.value = null
}
function saveKeybinding() {
async function saveKeybinding() {
if (currentEditingCommand.value && newBindingKeyCombo.value) {
const updated = keybindingStore.updateKeybindingOnCommand(
new KeybindingImpl({
@@ -249,7 +249,7 @@ function saveKeybinding() {
})
)
if (updated) {
keybindingService.persistUserKeybindings()
await keybindingService.persistUserKeybindings()
}
}
cancelEdit()