refactor(core): Remove linting exceptions in nodes-base (no-changelog) (#4944)

This commit is contained in:
Michael Kret
2023-01-13 19:11:56 +02:00
committed by GitHub
parent d7732ea150
commit 6608e69457
254 changed files with 2687 additions and 2675 deletions

View File

@@ -25,7 +25,7 @@ export async function apiRequest(
body: object,
query?: IDataObject,
): Promise<any> {
query = query || {};
query = query ?? {};
type N8nApiCredentials = {
apiKey: string;
@@ -60,7 +60,7 @@ export async function apiRequestAllItems(
body: object,
query?: IDataObject,
): Promise<any> {
query = query || {};
query = query ?? {};
const returnData: IDataObject[] = [];
let nextCursor: string | undefined = undefined;
@@ -190,11 +190,11 @@ export const prepareWorkflowCreateBody: PreSendAction = async function (
const body = requestOptions.body as IDataObject;
const newBody: IDataObject = {};
newBody.name = body.name || 'My workflow';
newBody.nodes = body.nodes || [];
newBody.settings = body.settings || {};
newBody.connections = body.connections || {};
newBody.staticData = body.staticData || null;
newBody.name = body.name ?? 'My workflow';
newBody.nodes = body.nodes ?? [];
newBody.settings = body.settings ?? {};
newBody.connections = body.connections ?? {};
newBody.staticData = body.staticData ?? null;
requestOptions.body = newBody;