mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
fix(core): Remove linting exceptions in nodes-base, @typescript-eslint/no-unsafe-argument (no-changelog)
This commit is contained in:
@@ -14,7 +14,7 @@ import type {
|
||||
IWebhookFunctions,
|
||||
} from 'n8n-core';
|
||||
|
||||
import type { IDataObject } from 'n8n-workflow';
|
||||
import type { IDataObject, JsonObject } from 'n8n-workflow';
|
||||
import { NodeApiError, NodeOperationError } from 'n8n-workflow';
|
||||
|
||||
import { URL } from 'url';
|
||||
@@ -92,7 +92,7 @@ export async function s3ApiRequest(
|
||||
try {
|
||||
return await this.helpers.request(options);
|
||||
} catch (error) {
|
||||
throw new NodeApiError(this.getNode(), error);
|
||||
throw new NodeApiError(this.getNode(), error as JsonObject);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -119,7 +119,7 @@ export async function s3ApiRequestREST(
|
||||
region,
|
||||
);
|
||||
try {
|
||||
return JSON.parse(response);
|
||||
return JSON.parse(response as string);
|
||||
} catch (error) {
|
||||
return response;
|
||||
}
|
||||
@@ -149,7 +149,7 @@ export async function s3ApiRequestSOAP(
|
||||
);
|
||||
try {
|
||||
return await new Promise((resolve, reject) => {
|
||||
parseString(response, { explicitArray: false }, (err, data) => {
|
||||
parseString(response as string, { explicitArray: false }, (err, data) => {
|
||||
if (err) {
|
||||
return reject(err);
|
||||
}
|
||||
@@ -199,9 +199,9 @@ export async function s3ApiRequestSOAPAllItems(
|
||||
}
|
||||
if (get(responseData, propertyName)) {
|
||||
if (Array.isArray(get(responseData, propertyName))) {
|
||||
returnData.push.apply(returnData, get(responseData, propertyName));
|
||||
returnData.push.apply(returnData, get(responseData, propertyName) as IDataObject[]);
|
||||
} else {
|
||||
returnData.push(get(responseData, propertyName));
|
||||
returnData.push(get(responseData, propertyName) as IDataObject);
|
||||
}
|
||||
}
|
||||
if (query.limit && query.limit <= returnData.length) {
|
||||
|
||||
Reference in New Issue
Block a user