fix(core): Remove linting exceptions in nodes-base, @typescript-eslint/no-unsafe-argument (no-changelog)

This commit is contained in:
Michael Kret
2023-02-28 05:39:43 +02:00
committed by GitHub
parent 3172ea376e
commit bb4db58819
560 changed files with 2227 additions and 1919 deletions

View File

@@ -28,7 +28,7 @@ export async function sendGridApiRequest(
json: true,
};
if (Object.keys(body).length === 0) {
if (Object.keys(body as IDataObject).length === 0) {
delete options.body;
}
@@ -55,9 +55,10 @@ export async function sendGridApiRequestAllItems(
let uri;
do {
responseData = await sendGridApiRequest.call(this, endpoint, method, body, query, uri);
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
responseData = await sendGridApiRequest.call(this, endpoint, method, body, query, uri); // posible bug, as function does not have uri parameter
uri = responseData._metadata.next;
returnData.push.apply(returnData, responseData[propertyName]);
returnData.push.apply(returnData, responseData[propertyName] as IDataObject[]);
if (query.limit && returnData.length >= query.limit) {
return returnData;
}