mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-20 11:22:15 +00:00
refactor(core): Remove linting exceptions in nodes-base (#4794)
* ⚡ enabled array-type * ⚡ await-thenable on * ⚡ ban-types on * ⚡ default-param-last on * ⚡ dot-notation on * ⚡ member-delimiter-style on * ⚡ no-duplicate-imports on * ⚡ no-empty-interface on * ⚡ no-floating-promises on * ⚡ no-for-in-array on * ⚡ no-invalid-void-type on * ⚡ no-loop-func on * ⚡ no-shadow on * ⚡ ban-ts-comment re enabled * ⚡ @typescript-eslint/lines-between-class-members on * address my own comment * @typescript-eslint/return-await on * @typescript-eslint/promise-function-async on * @typescript-eslint/no-unnecessary-boolean-literal-compare on * @typescript-eslint/no-unnecessary-type-assertion on * prefer-const on * @typescript-eslint/prefer-optional-chain on Co-authored-by: कारतोफ्फेलस्क्रिप्ट™ <aditya@netroy.in>
This commit is contained in:
@@ -351,7 +351,7 @@ export class GmailV1 implements INodeType {
|
||||
attachments: attachmentsList,
|
||||
};
|
||||
|
||||
if ((this.getNodeParameter('includeHtml', i, false) as boolean) === true) {
|
||||
if (this.getNodeParameter('includeHtml', i, false) as boolean) {
|
||||
email.htmlBody = this.getNodeParameter('htmlMessage', i) as string;
|
||||
}
|
||||
|
||||
@@ -465,7 +465,7 @@ export class GmailV1 implements INodeType {
|
||||
attachments: attachmentsList,
|
||||
};
|
||||
|
||||
if ((this.getNodeParameter('includeHtml', i, false) as boolean) === true) {
|
||||
if (this.getNodeParameter('includeHtml', i, false) as boolean) {
|
||||
email.htmlBody = this.getNodeParameter('htmlMessage', i) as string;
|
||||
}
|
||||
|
||||
@@ -566,11 +566,11 @@ export class GmailV1 implements INodeType {
|
||||
qs.format = format;
|
||||
}
|
||||
|
||||
for (let i = 0; i < responseData.length; i++) {
|
||||
responseData[i] = await googleApiRequest.call(
|
||||
for (let index = 0; index < responseData.length; index++) {
|
||||
responseData[index] = await googleApiRequest.call(
|
||||
this,
|
||||
'GET',
|
||||
`/gmail/v1/users/me/messages/${responseData[i].id}`,
|
||||
`/gmail/v1/users/me/messages/${responseData[index].id}`,
|
||||
body,
|
||||
qs,
|
||||
);
|
||||
@@ -579,9 +579,9 @@ export class GmailV1 implements INodeType {
|
||||
const dataPropertyNameDownload =
|
||||
(additionalFields.dataPropertyAttachmentsPrefixName as string) || 'attachment_';
|
||||
|
||||
responseData[i] = await parseRawEmail.call(
|
||||
responseData[index] = await parseRawEmail.call(
|
||||
this,
|
||||
responseData[i],
|
||||
responseData[index],
|
||||
dataPropertyNameDownload,
|
||||
);
|
||||
}
|
||||
@@ -686,7 +686,7 @@ export class GmailV1 implements INodeType {
|
||||
attachments: attachmentsList,
|
||||
};
|
||||
|
||||
if ((this.getNodeParameter('includeHtml', i, false) as boolean) === true) {
|
||||
if (this.getNodeParameter('includeHtml', i, false) as boolean) {
|
||||
email.htmlBody = this.getNodeParameter('htmlMessage', i) as string;
|
||||
}
|
||||
|
||||
@@ -794,11 +794,11 @@ export class GmailV1 implements INodeType {
|
||||
qs.format = format;
|
||||
}
|
||||
|
||||
for (let i = 0; i < responseData.length; i++) {
|
||||
responseData[i] = await googleApiRequest.call(
|
||||
for (let index = 0; index < responseData.length; index++) {
|
||||
responseData[index] = await googleApiRequest.call(
|
||||
this,
|
||||
'GET',
|
||||
`/gmail/v1/users/me/drafts/${responseData[i].id}`,
|
||||
`/gmail/v1/users/me/drafts/${responseData[index].id}`,
|
||||
body,
|
||||
qs,
|
||||
);
|
||||
@@ -806,16 +806,16 @@ export class GmailV1 implements INodeType {
|
||||
if (format === 'resolved') {
|
||||
const dataPropertyNameDownload =
|
||||
(additionalFields.dataPropertyAttachmentsPrefixName as string) || 'attachment_';
|
||||
const id = responseData[i].id;
|
||||
responseData[i] = await parseRawEmail.call(
|
||||
const id = responseData[index].id;
|
||||
responseData[index] = await parseRawEmail.call(
|
||||
this,
|
||||
responseData[i].message,
|
||||
responseData[index].message,
|
||||
dataPropertyNameDownload,
|
||||
);
|
||||
|
||||
// Add the draft-id
|
||||
responseData[i].json.messageId = responseData[i].json.id;
|
||||
responseData[i].json.id = id;
|
||||
responseData[index].json.messageId = responseData[index].json.id;
|
||||
responseData[index].json.id = id;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user