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

Co-authored-by: कारतोफ्फेलस्क्रिप्ट™ <aditya@netroy.in>
This commit is contained in:
Tomi Turtiainen
2024-01-17 17:08:50 +02:00
committed by GitHub
parent 2eb829a6b4
commit 9a1cc56806
369 changed files with 1041 additions and 928 deletions

View File

@@ -332,7 +332,7 @@ export class EmailReadImapV1 implements INodeType {
.getPartData(message, attachmentPart)
.then(async (partData) => {
// Return it in the format n8n expects
return this.helpers.prepareBinaryData(
return await this.helpers.prepareBinaryData(
partData as Buffer,
attachmentPart.disposition.params.filename as string,
);
@@ -341,7 +341,7 @@ export class EmailReadImapV1 implements INodeType {
attachmentPromises.push(attachmentPromise);
}
return Promise.all(attachmentPromises);
return await Promise.all(attachmentPromises);
};
// Returns all the new unseen messages
@@ -588,7 +588,7 @@ export class EmailReadImapV1 implements INodeType {
// Connect to the IMAP server and open the mailbox
// that we get informed whenever a new email arrives
return imapConnect(config).then(async (conn) => {
return await imapConnect(config).then(async (conn) => {
conn.on('error', async (error) => {
const errorCode = error.code.toUpperCase();
if (['ECONNRESET', 'EPIPE'].includes(errorCode as string)) {

View File

@@ -359,13 +359,13 @@ export class EmailReadImapV2 implements INodeType {
?.filename as string,
);
// Return it in the format n8n expects
return this.helpers.prepareBinaryData(partData as Buffer, fileName);
return await this.helpers.prepareBinaryData(partData as Buffer, fileName);
});
attachmentPromises.push(attachmentPromise);
}
return Promise.all(attachmentPromises);
return await Promise.all(attachmentPromises);
};
// Returns all the new unseen messages
@@ -618,7 +618,7 @@ export class EmailReadImapV2 implements INodeType {
// Connect to the IMAP server and open the mailbox
// that we get informed whenever a new email arrives
return imapConnect(config).then(async (conn) => {
return await imapConnect(config).then(async (conn) => {
conn.on('close', async (_hadError: boolean) => {
if (isCurrentlyReconnecting) {
this.logger.debug('Email Read Imap: Connected closed for forced reconnecting');