fix: Set '@typescript-eslint/return-await' rule to 'always' for FE (no-changelog) (#8373)

This commit is contained in:
Tomi Turtiainen
2024-01-18 11:28:01 +02:00
committed by GitHub
parent fc94377036
commit 1aa35b190a
67 changed files with 348 additions and 282 deletions

View File

@@ -26,7 +26,7 @@ export function useHistoryHelper(activeRoute: Route) {
const { isCtrlKeyPressed } = useDeviceSupport();
const undo = async () =>
callDebounced(
await callDebounced(
async () => {
const command = historyStore.popUndoableToUndo();
if (!command) {
@@ -55,7 +55,7 @@ export function useHistoryHelper(activeRoute: Route) {
);
const redo = async () =>
callDebounced(
await callDebounced(
async () => {
const command = historyStore.popUndoableToRedo();
if (!command) {

View File

@@ -21,9 +21,11 @@ export function useMessage() {
};
if (typeof configOrTitle === 'string') {
return MessageBox.alert(message, configOrTitle, resolvedConfig).catch(handleCancelOrClose);
return await MessageBox.alert(message, configOrTitle, resolvedConfig).catch(
handleCancelOrClose,
);
}
return MessageBox.alert(message, resolvedConfig).catch(handleCancelOrClose);
return await MessageBox.alert(message, resolvedConfig).catch(handleCancelOrClose);
}
async function confirm(
@@ -41,13 +43,13 @@ export function useMessage() {
};
if (typeof configOrTitle === 'string') {
return MessageBox.confirm(message, configOrTitle, resolvedConfig).catch(
return await (MessageBox.confirm(message, configOrTitle, resolvedConfig).catch(
handleCancelOrClose,
) as unknown as Promise<MessageBoxConfirmResult>;
) as unknown as Promise<MessageBoxConfirmResult>);
}
return MessageBox.confirm(message, resolvedConfig).catch(
return await (MessageBox.confirm(message, resolvedConfig).catch(
handleCancelOrClose,
) as unknown as Promise<MessageBoxConfirmResult>;
) as unknown as Promise<MessageBoxConfirmResult>);
}
async function prompt(
@@ -62,9 +64,11 @@ export function useMessage() {
};
if (typeof configOrTitle === 'string') {
return MessageBox.prompt(message, configOrTitle, resolvedConfig).catch(handleCancelOrClose);
return await MessageBox.prompt(message, configOrTitle, resolvedConfig).catch(
handleCancelOrClose,
);
}
return MessageBox.prompt(message, resolvedConfig).catch(handleCancelOrClose);
return await MessageBox.prompt(message, resolvedConfig).catch(handleCancelOrClose);
}
return {