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

@@ -2,7 +2,7 @@ import type { OptionsWithUri } from 'request';
import type { IExecuteFunctions, IHookFunctions } from 'n8n-core';
import type { IDataObject, ILoadOptionsFunctions } from 'n8n-workflow';
import type { IDataObject, ILoadOptionsFunctions, JsonObject } from 'n8n-workflow';
import { NodeApiError, NodeOperationError } from 'n8n-workflow';
import flow from 'lodash.flow';
@@ -68,11 +68,11 @@ export async function zohoApiRequest(
if (responseData === undefined) return [];
throwOnErrorStatus.call(this, responseData);
throwOnErrorStatus.call(this, responseData as IDataObject);
return responseData;
} catch (error) {
throw new NodeApiError(this.getNode(), error);
throw new NodeApiError(this.getNode(), error as JsonObject);
}
}
@@ -95,7 +95,7 @@ export async function zohoApiRequestAllItems(
do {
responseData = await zohoApiRequest.call(this, method, endpoint, body, qs);
if (Array.isArray(responseData) && !responseData.length) return returnData;
returnData.push(...responseData.data);
returnData.push(...(responseData.data as IDataObject[]));
qs.page++;
} while (responseData.info.more_records !== undefined && responseData.info.more_records === true);