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

@@ -8,7 +8,7 @@ import type {
IWebhookFunctions,
} from 'n8n-core';
import type { IDataObject } from 'n8n-workflow';
import type { JsonObject, IDataObject } from 'n8n-workflow';
import { NodeApiError } from 'n8n-workflow';
export async function paddleApiRequest(
@@ -47,12 +47,12 @@ export async function paddleApiRequest(
const response = await this.helpers.request(options);
if (!response.success) {
throw new NodeApiError(this.getNode(), response);
throw new NodeApiError(this.getNode(), response as JsonObject);
}
return response;
} catch (error) {
throw new NodeApiError(this.getNode(), error);
throw new NodeApiError(this.getNode(), error as JsonObject);
}
}
@@ -74,7 +74,7 @@ export async function paddleApiRequestAllItems(
do {
responseData = await paddleApiRequest.call(this, endpoint, method, body, query);
returnData.push.apply(returnData, responseData[propertyName]);
returnData.push.apply(returnData, responseData[propertyName] as IDataObject[]);
body.page++;
} while (
responseData[propertyName].length !== 0 &&