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

@@ -3,6 +3,7 @@ import type { IExecuteFunctions } from 'n8n-core';
import type {
IDataObject,
ILoadOptionsFunctions,
INodeExecutionData,
INodePropertyOptions,
INodeType,
INodeTypeDescription,
@@ -256,7 +257,7 @@ export class Wise implements INodeType {
items[i].binary = items[i].binary ?? {};
items[i].binary![binaryProperty] = await this.helpers.prepareBinaryData(
data,
data as Buffer,
this.getNodeParameter('fileName', i) as string,
);
@@ -484,7 +485,7 @@ export class Wise implements INodeType {
items[i].binary = items[i].binary ?? {};
items[i].binary![binaryProperty] = await this.helpers.prepareBinaryData(
data,
data as Buffer,
this.getNodeParameter('fileName', i) as string,
);
@@ -539,12 +540,12 @@ export class Wise implements INodeType {
}
Array.isArray(responseData)
? returnData.push(...responseData)
: returnData.push(responseData);
? returnData.push(...(responseData as IDataObject[]))
: returnData.push(responseData as IDataObject);
}
if (binaryOutput && responseData !== undefined) {
return this.prepareOutputData(responseData);
return this.prepareOutputData(responseData as INodeExecutionData[]);
}
return [this.helpers.returnJsonArray(returnData)];