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:
Michael Kret
2022-12-02 22:54:28 +02:00
committed by GitHub
parent 8101c05d6f
commit 61e26804ba
796 changed files with 3735 additions and 2847 deletions

View File

@@ -121,11 +121,7 @@ export async function pipedriveApiRequestAllItems(
}
query.start = responseData.additionalData.pagination.next_start;
} while (
responseData.additionalData !== undefined &&
responseData.additionalData.pagination !== undefined &&
responseData.additionalData.pagination.more_items_in_collection === true
);
} while (responseData.additionalData?.pagination?.more_items_in_collection === true);
return {
data: returnData,
@@ -190,7 +186,7 @@ export function pipedriveEncodeCustomProperties(
for (const key of Object.keys(item)) {
customPropertyData = Object.values(customProperties).find(
(customPropertyData) => customPropertyData.name === key,
(propertyData) => propertyData.name === key,
);
if (customPropertyData !== undefined) {
@@ -209,12 +205,12 @@ export function pipedriveEncodeCustomProperties(
);
if (propertyOption !== undefined) {
item[customPropertyData.key as string] = propertyOption.id;
item[customPropertyData.key] = propertyOption.id;
delete item[key];
}
} else {
// Does already represent the actual value or is null
item[customPropertyData.key as string] = item[key];
item[customPropertyData.key] = item[key];
delete item[key];
}
}
@@ -265,7 +261,7 @@ export function pipedriveResolveCustomProperties(
'timerange',
].includes(customPropertyData.field_type)
) {
json[customPropertyData.name as string] = json[key];
json[customPropertyData.name] = json[key];
delete json[key];
// type options
} else if (
@@ -276,7 +272,7 @@ export function pipedriveResolveCustomProperties(
(option) => option.id.toString() === json[key]!.toString(),
);
if (propertyOption !== undefined) {
json[customPropertyData.name as string] = propertyOption.label;
json[customPropertyData.name] = propertyOption.label;
delete json[key];
}
// type multioptions