mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
fix(core): Remove linting exceptions in nodes-base, @typescript-eslint/no-unsafe-argument (no-changelog)
This commit is contained in:
@@ -6,6 +6,7 @@ import type {
|
||||
INodeExecutionData,
|
||||
INodeType,
|
||||
INodeTypeDescription,
|
||||
JsonObject,
|
||||
} from 'n8n-workflow';
|
||||
import { NodeApiError, NodeOperationError } from 'n8n-workflow';
|
||||
|
||||
@@ -109,7 +110,7 @@ export class MicrosoftOneDrive implements INodeType {
|
||||
const fileName = responseData.name;
|
||||
|
||||
if (responseData.file === undefined) {
|
||||
throw new NodeApiError(this.getNode(), responseData, {
|
||||
throw new NodeApiError(this.getNode(), responseData as JsonObject, {
|
||||
message: 'The ID you provided does not belong to a file.',
|
||||
});
|
||||
}
|
||||
@@ -148,11 +149,11 @@ export class MicrosoftOneDrive implements INodeType {
|
||||
|
||||
items[i] = newItem;
|
||||
|
||||
const data = Buffer.from(responseData.body);
|
||||
const data = Buffer.from(responseData.body as Buffer);
|
||||
|
||||
items[i].binary![dataPropertyNameDownload] = await this.helpers.prepareBinaryData(
|
||||
data as unknown as Buffer,
|
||||
fileName,
|
||||
fileName as string,
|
||||
mimeType,
|
||||
);
|
||||
}
|
||||
@@ -234,7 +235,7 @@ export class MicrosoftOneDrive implements INodeType {
|
||||
{},
|
||||
);
|
||||
|
||||
responseData = JSON.parse(responseData);
|
||||
responseData = JSON.parse(responseData as string);
|
||||
} else {
|
||||
const body = this.getNodeParameter('fileContent', i) as string;
|
||||
if (fileName === '') {
|
||||
@@ -356,7 +357,7 @@ export class MicrosoftOneDrive implements INodeType {
|
||||
throw error;
|
||||
}
|
||||
const executionData = this.helpers.constructExecutionMetaData(
|
||||
this.helpers.returnJsonArray(responseData),
|
||||
this.helpers.returnJsonArray(responseData as IDataObject),
|
||||
{ itemData: { item: i } },
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user