fix(core): Remove linting exceptions in nodes-base, @typescript-eslint/no-unsafe-argument (no-changelog)

This commit is contained in:
Michael Kret
2023-02-28 05:39:43 +02:00
committed by GitHub
parent 3172ea376e
commit bb4db58819
560 changed files with 2227 additions and 1919 deletions

View File

@@ -2,7 +2,7 @@ import type { OptionsWithUri } from 'request';
import type { IExecuteFunctions, IHookFunctions } from 'n8n-core';
import type { IDataObject, ILoadOptionsFunctions } from 'n8n-workflow';
import type { IDataObject, ILoadOptionsFunctions, JsonObject } from 'n8n-workflow';
import { NodeApiError, NodeOperationError } from 'n8n-workflow';
/**
@@ -56,7 +56,7 @@ export async function githubApiRequest(
return await this.helpers.requestWithAuthentication.call(this, credentialType, options);
} catch (error) {
throw new NodeApiError(this.getNode(), error);
throw new NodeApiError(this.getNode(), error as JsonObject);
}
}
@@ -101,11 +101,11 @@ export async function githubApiRequestAllItems(
query.page = 1;
do {
responseData = await githubApiRequest.call(this, method, endpoint, body, query, {
responseData = await githubApiRequest.call(this, method, endpoint, body as IDataObject, query, {
resolveWithFullResponse: true,
});
query.page++;
returnData.push.apply(returnData, responseData.body);
returnData.push.apply(returnData, responseData.body as IDataObject[]);
} while (responseData.headers.link?.includes('next'));
return returnData;
}