mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +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:
@@ -35,19 +35,19 @@ export namespace SendInBlueNode {
|
||||
[
|
||||
OVERRIDE_MAP_TYPE.CATEGORY,
|
||||
(body: JsonObject) => {
|
||||
body!.type = OVERRIDE_MAP_VALUES.CATEGORY;
|
||||
body.type = OVERRIDE_MAP_VALUES.CATEGORY;
|
||||
},
|
||||
],
|
||||
[
|
||||
OVERRIDE_MAP_TYPE.NORMAL,
|
||||
(body: JsonObject) => {
|
||||
body!.type = OVERRIDE_MAP_VALUES.NORMAL;
|
||||
body.type = OVERRIDE_MAP_VALUES.NORMAL;
|
||||
},
|
||||
],
|
||||
[
|
||||
OVERRIDE_MAP_TYPE.TRANSACTIONAL,
|
||||
(body: JsonObject) => {
|
||||
body!.type = OVERRIDE_MAP_VALUES.TRANSACTIONAL;
|
||||
body.type = OVERRIDE_MAP_VALUES.TRANSACTIONAL;
|
||||
},
|
||||
],
|
||||
]);
|
||||
@@ -67,19 +67,19 @@ export namespace SendInBlueNode {
|
||||
const { binaryPropertyName } = dataPropertyList;
|
||||
const dataMappingList = (binaryPropertyName as string).split(',');
|
||||
for (const attachmentDataName of dataMappingList) {
|
||||
const binaryPropertyName = attachmentDataName;
|
||||
const binaryPropertyAttachmentName = attachmentDataName;
|
||||
|
||||
const item = this.getInputData();
|
||||
|
||||
if (item.binary![binaryPropertyName as string] === undefined) {
|
||||
if (item.binary![binaryPropertyAttachmentName] === undefined) {
|
||||
throw new NodeOperationError(
|
||||
this.getNode(),
|
||||
`No binary data property “${binaryPropertyName}” exists on item!`,
|
||||
`No binary data property “${binaryPropertyAttachmentName}” exists on item!`,
|
||||
);
|
||||
}
|
||||
|
||||
const bufferFromIncomingData = (await this.helpers.getBinaryDataBuffer(
|
||||
binaryPropertyName,
|
||||
binaryPropertyAttachmentName,
|
||||
)) as Buffer;
|
||||
|
||||
const {
|
||||
@@ -115,9 +115,9 @@ export namespace SendInBlueNode {
|
||||
const { tag } = this.getNodeParameter('additionalFields.emailTags.tags') as JsonObject;
|
||||
const tags = (tag as string)
|
||||
.split(',')
|
||||
.map((tag) => tag.trim())
|
||||
.filter((tag) => {
|
||||
return tag !== '';
|
||||
.map((entry) => entry.trim())
|
||||
.filter((entry) => {
|
||||
return entry !== '';
|
||||
});
|
||||
const { body } = requestOptions;
|
||||
Object.assign(body!, { tags });
|
||||
@@ -338,7 +338,7 @@ export namespace SendInBlueWebhookApi {
|
||||
options,
|
||||
)) as string;
|
||||
|
||||
return jsonParse(webhooks) as Webhooks;
|
||||
return jsonParse(webhooks);
|
||||
};
|
||||
|
||||
export const createWebHook = async (
|
||||
@@ -368,7 +368,7 @@ export namespace SendInBlueWebhookApi {
|
||||
options,
|
||||
);
|
||||
|
||||
return jsonParse(webhookId) as WebhookId;
|
||||
return jsonParse(webhookId);
|
||||
};
|
||||
|
||||
export const deleteWebhook = async (ref: IHookFunctions, webhookId: string) => {
|
||||
@@ -384,6 +384,6 @@ export namespace SendInBlueWebhookApi {
|
||||
body,
|
||||
};
|
||||
|
||||
return await ref.helpers.requestWithAuthentication.call(ref, credentialsName, options);
|
||||
return ref.helpers.requestWithAuthentication.call(ref, credentialsName, options);
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user