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

@@ -248,20 +248,20 @@ export default mixins(showMessage, nodeHelpers).extend({
}
}
this.$externalHooks().run('credentialsEdit.credentialModalOpened', {
await this.$externalHooks().run('credentialsEdit.credentialModalOpened', {
credentialType: this.credentialTypeName,
isEditingCredential: this.mode === 'edit',
activeNode: this.ndvStore.activeNode,
});
setTimeout(() => {
setTimeout(async () => {
if (this.credentialId) {
if (!this.requiredPropertiesFilled && this.credentialPermissions.isOwner === true) {
// sharees can't see properties, so this check would always fail for them
// if the credential contains required fields.
this.showValidationWarning = true;
} else {
this.retestCredential();
await this.retestCredential();
}
}
}, 0);
@@ -825,7 +825,7 @@ export default mixins(showMessage, nodeHelpers).extend({
}
this.$telemetry.track('User saved credentials', trackProperties);
this.$externalHooks().run('credentialEdit.saveCredential', trackProperties);
await this.$externalHooks().run('credentialEdit.saveCredential', trackProperties);
}
return credential;
@@ -848,7 +848,7 @@ export default mixins(showMessage, nodeHelpers).extend({
return null;
}
this.$externalHooks().run('credential.saved', {
await this.$externalHooks().run('credential.saved', {
credential_type: credentialDetails.type,
credential_id: credential.id,
is_new: true,
@@ -882,7 +882,7 @@ export default mixins(showMessage, nodeHelpers).extend({
return null;
}
this.$externalHooks().run('credential.saved', {
await this.$externalHooks().run('credential.saved', {
credential_type: credentialDetails.type,
credential_id: credential.id,
is_new: false,
@@ -922,7 +922,7 @@ export default mixins(showMessage, nodeHelpers).extend({
try {
this.isDeleting = true;
this.credentialsStore.deleteCredential({ id: this.credentialId });
await this.credentialsStore.deleteCredential({ id: this.credentialId });
this.hasUnsavedChanges = false;
} catch (error) {
this.$showError(