mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 10:31:15 +00:00
fix(core): Remove linting exceptions in nodes-base, @typescript-eslint/no-unsafe-argument (no-changelog)
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import type { OptionsWithUri } from 'request';
|
||||
|
||||
import type { IDataObject } from 'n8n-workflow';
|
||||
import type { IDataObject, JsonObject } from 'n8n-workflow';
|
||||
import { NodeApiError, NodeOperationError } from 'n8n-workflow';
|
||||
|
||||
import type { IExecuteFunctions, IExecuteSingleFunctions, ILoadOptionsFunctions } from 'n8n-core';
|
||||
@@ -46,9 +46,9 @@ export async function matrixApiRequest(
|
||||
// When working with images, the request cannot be JSON (it's raw binary data)
|
||||
// But the output is JSON so we have to parse it manually.
|
||||
//@ts-ignore
|
||||
return options.overridePrefix === 'media' ? JSON.parse(response) : response;
|
||||
return options.overridePrefix === 'media' ? JSON.parse(response as string) : response;
|
||||
} catch (error) {
|
||||
throw new NodeApiError(this.getNode(), error);
|
||||
throw new NodeApiError(this.getNode(), error as JsonObject);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -148,7 +148,7 @@ export async function handleMatrixCall(
|
||||
{},
|
||||
qs,
|
||||
);
|
||||
returnData.push.apply(returnData, responseData.chunk);
|
||||
returnData.push.apply(returnData, responseData.chunk as IDataObject[]);
|
||||
from = responseData.end;
|
||||
} while (responseData.chunk.length > 0);
|
||||
} else {
|
||||
@@ -169,7 +169,7 @@ export async function handleMatrixCall(
|
||||
{},
|
||||
qs,
|
||||
);
|
||||
returnData.push.apply(returnData, responseData.chunk);
|
||||
returnData.push.apply(returnData, responseData.chunk as IDataObject[]);
|
||||
}
|
||||
|
||||
return returnData;
|
||||
|
||||
Reference in New Issue
Block a user