refactor(editor): Stricter linting for promises and async functions (no-changelog) (#4642)

This commit is contained in:
Michael Kret
2023-05-10 18:10:03 +03:00
committed by GitHub
parent 1b1dc0e655
commit ed3bc154b0
114 changed files with 351 additions and 344 deletions

View File

@@ -565,20 +565,20 @@ export const pushConnection = mixins(
this.processWaitingPushMessages();
} else if (receivedData.type === 'reloadNodeType') {
this.nodeTypesStore.getNodeTypes();
this.nodeTypesStore.getFullNodesProperties([receivedData.data]);
await this.nodeTypesStore.getNodeTypes();
await this.nodeTypesStore.getFullNodesProperties([receivedData.data]);
} else if (receivedData.type === 'removeNodeType') {
const pushData = receivedData.data;
const nodesToBeRemoved: INodeTypeNameVersion[] = [pushData];
// Force reload of all credential types
this.credentialsStore.fetchCredentialTypes(false).then(() => {
await this.credentialsStore.fetchCredentialTypes(false).then(() => {
this.nodeTypesStore.removeNodeTypes(nodesToBeRemoved);
});
} else if (receivedData.type === 'nodeDescriptionUpdated') {
this.nodeTypesStore.getNodeTypes();
this.credentialsStore.fetchCredentialTypes(true);
await this.nodeTypesStore.getNodeTypes();
await this.credentialsStore.fetchCredentialTypes(true);
}
return true;
},

View File

@@ -129,7 +129,7 @@ export const showMessage = mixins(externalHooks).extend({
false,
);
this.$externalHooks().run('showMessage.showError', {
void this.$externalHooks().run('showMessage.showError', {
title,
message,
errorMessage: error.message,

View File

@@ -115,7 +115,7 @@ export const workflowActivate = mixins(externalHooks, workflowHelpers, showMessa
) {
this.uiStore.openModal(WORKFLOW_ACTIVE_MODAL_KEY);
} else {
this.settingsStore.fetchPromptsData();
await this.settingsStore.fetchPromptsData();
}
}
},

View File

@@ -875,7 +875,7 @@ export const workflowHelpers = mixins(externalHooks, nodeHelpers, showMessage).e
}
if (redirect) {
this.$router.replace({
void this.$router.replace({
name: VIEWS.WORKFLOW,
params: { name: workflowData.id as string, action: 'workflowSave' },
});

View File

@@ -115,7 +115,7 @@ export const workflowRun = mixins(externalHooks, workflowHelpers, showMessage).e
this.titleSet(workflow.name as string, 'ERROR');
this.$externalHooks().run('workflowRun.runError', { errorMessages, nodeName });
this.getWorkflowDataToSave().then((workflowData) => {
await this.getWorkflowDataToSave().then((workflowData) => {
this.$telemetry.track('Workflow execution preflight failed', {
workflow_id: workflow.id,
workflow_name: workflow.name,
@@ -234,7 +234,7 @@ export const workflowRun = mixins(externalHooks, workflowHelpers, showMessage).e
const runWorkflowApiResponse = await this.runWorkflowApi(startRunData);
this.$externalHooks().run('workflowRun.runWorkflow', { nodeName, source });
await this.$externalHooks().run('workflowRun.runWorkflow', { nodeName, source });
return runWorkflowApiResponse;
} catch (error) {