mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 02:21:13 +00:00
fix(core): Remove linting exceptions in nodes-base, @typescript-eslint/no-unsafe-argument (no-changelog)
This commit is contained in:
@@ -87,7 +87,7 @@ export async function googleApiRequest(
|
||||
if (Object.keys(headers).length !== 0) {
|
||||
options.headers = Object.assign({}, options.headers, headers);
|
||||
}
|
||||
if (Object.keys(body).length === 0) {
|
||||
if (Object.keys(body as IDataObject).length === 0) {
|
||||
delete options.body;
|
||||
}
|
||||
|
||||
@@ -131,7 +131,7 @@ export async function googleApiRequestAllItems(
|
||||
do {
|
||||
responseData = await googleApiRequest.call(this, method, endpoint, body, query);
|
||||
query.pageToken = responseData.pageToken;
|
||||
returnData.push.apply(returnData, responseData[propertyName]);
|
||||
returnData.push.apply(returnData, responseData[propertyName] as IDataObject[]);
|
||||
} while (responseData.pageToken !== undefined && responseData.pageToken !== '');
|
||||
|
||||
return returnData;
|
||||
|
||||
@@ -7,6 +7,7 @@ import type {
|
||||
INodePropertyOptions,
|
||||
INodeType,
|
||||
INodeTypeDescription,
|
||||
JsonObject,
|
||||
} from 'n8n-workflow';
|
||||
import { NodeApiError } from 'n8n-workflow';
|
||||
|
||||
@@ -192,7 +193,7 @@ export class GoogleBigQuery implements INodeType {
|
||||
);
|
||||
|
||||
const executionData = this.helpers.constructExecutionMetaData(
|
||||
this.helpers.returnJsonArray(responseData),
|
||||
this.helpers.returnJsonArray(responseData as IDataObject),
|
||||
{ itemData: { item: 0 } },
|
||||
);
|
||||
returnData.push(...executionData);
|
||||
@@ -204,7 +205,7 @@ export class GoogleBigQuery implements INodeType {
|
||||
);
|
||||
returnData.push(...executionErrorData);
|
||||
}
|
||||
throw new NodeApiError(this.getNode(), error, { itemIndex: 0 });
|
||||
throw new NodeApiError(this.getNode(), error as JsonObject, { itemIndex: 0 });
|
||||
}
|
||||
} else if (operation === 'getAll') {
|
||||
// ----------------------------------
|
||||
@@ -262,10 +263,12 @@ export class GoogleBigQuery implements INodeType {
|
||||
if (!returnAll) {
|
||||
responseData = responseData.rows;
|
||||
}
|
||||
responseData = simple ? simplify(responseData, fields) : responseData;
|
||||
responseData = simple
|
||||
? simplify(responseData as IDataObject[], fields as string[])
|
||||
: responseData;
|
||||
|
||||
const executionData = this.helpers.constructExecutionMetaData(
|
||||
this.helpers.returnJsonArray(responseData),
|
||||
this.helpers.returnJsonArray(responseData as IDataObject[]),
|
||||
{ itemData: { item: i } },
|
||||
);
|
||||
returnData.push(...executionData);
|
||||
@@ -278,7 +281,7 @@ export class GoogleBigQuery implements INodeType {
|
||||
returnData.push(...executionErrorData);
|
||||
continue;
|
||||
}
|
||||
throw new NodeApiError(this.getNode(), error, { itemIndex: i });
|
||||
throw new NodeApiError(this.getNode(), error as JsonObject, { itemIndex: i });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user