fix: Set '@typescript-eslint/return-await' rule to 'always' for FE (no-changelog) (#8373)
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user