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 { IExecuteFunctions, IHookFunctions, ILoadOptionsFunctions } from 'n
import type { OptionsWithUri } from 'request';
import type { IDataObject, IPollFunctions } from 'n8n-workflow';
import type { IDataObject, IPollFunctions, JsonObject } from 'n8n-workflow';
import { NodeApiError } from 'n8n-workflow';
/**
@@ -43,7 +43,7 @@ export async function apiRequest(
try {
return await this.helpers.request(options);
} catch (error) {
throw new NodeApiError(this.getNode(), error);
throw new NodeApiError(this.getNode(), error as JsonObject);
}
}
@@ -59,7 +59,7 @@ export async function apiRequestAllItems(
endpoint: string,
body: IDataObject = {},
query: IDataObject = {},
): Promise<any> {
) {
query.maxrecord = 100;
query.offset = 0;
@@ -70,7 +70,7 @@ export async function apiRequestAllItems(
do {
responseData = await apiRequest.call(this, method, endpoint, body, query);
returnData.push.apply(returnData, responseData);
returnData.push.apply(returnData, responseData as IDataObject[]);
query.offset += query.maxrecord;
} while (responseData.length !== 0);