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:
@@ -2,7 +2,7 @@ import type { IExecuteFunctions } from 'n8n-core';
|
||||
|
||||
import type { OptionsWithUri } from 'request';
|
||||
|
||||
import type { IDataObject, ILoadOptionsFunctions, IPollFunctions } from 'n8n-workflow';
|
||||
import type { IDataObject, ILoadOptionsFunctions, IPollFunctions, JsonObject } from 'n8n-workflow';
|
||||
import { NodeApiError } from 'n8n-workflow';
|
||||
|
||||
import type { TDtableMetadataColumns, TDtableViewColumns, TEndpointVariableName } from './types';
|
||||
@@ -97,7 +97,7 @@ export async function seaTableApiRequest(
|
||||
json: true,
|
||||
};
|
||||
|
||||
if (Object.keys(body).length === 0) {
|
||||
if (Object.keys(body as IDataObject).length === 0) {
|
||||
delete options.body;
|
||||
}
|
||||
|
||||
@@ -108,7 +108,7 @@ export async function seaTableApiRequest(
|
||||
try {
|
||||
return await this.helpers.request(options);
|
||||
} catch (error) {
|
||||
throw new NodeApiError(this.getNode(), error);
|
||||
throw new NodeApiError(this.getNode(), error as JsonObject);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -142,7 +142,7 @@ export async function setableApiRequestAllItems(
|
||||
query,
|
||||
)) as unknown as IRow[];
|
||||
//@ts-ignore
|
||||
returnData.push.apply(returnData, responseData[propertyName]);
|
||||
returnData.push.apply(returnData, responseData[propertyName] as IDataObject[]);
|
||||
query.start = +query.start + segment;
|
||||
} while (responseData && responseData.length > segment - 1);
|
||||
|
||||
@@ -280,7 +280,7 @@ function rowFormatColumn(input: unknown): boolean | number | string | string[] |
|
||||
return input;
|
||||
} else if (Array.isArray(input) && input.every((i) => typeof i === 'object')) {
|
||||
const returnItems = [] as string[];
|
||||
input.every((i) => returnItems.push(i.display_value));
|
||||
input.every((i) => returnItems.push(i.display_value as string));
|
||||
return returnItems;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user