From 800221353825ce1219bb66d4efb20361e947f4ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E0=A4=95=E0=A4=BE=E0=A4=B0=E0=A4=A4=E0=A5=8B=E0=A4=AB?= =?UTF-8?q?=E0=A5=8D=E0=A4=AB=E0=A5=87=E0=A4=B2=E0=A4=B8=E0=A5=8D=E0=A4=95?= =?UTF-8?q?=E0=A5=8D=E0=A4=B0=E0=A4=BF=E0=A4=AA=E0=A5=8D=E0=A4=9F=E2=84=A2?= Date: Thu, 6 Jul 2023 09:21:50 +0200 Subject: [PATCH] ci: Fix linting issues (no-changelog) --- packages/cli/src/commands/Interfaces.d.ts | 2 +- packages/cli/src/commands/executeBatch.ts | 10 +++++----- packages/nodes-base/nodes/Sendy/Sendy.node.ts | 2 +- .../nodes-base/nodes/Strava/ActivityDescription.ts | 3 ++- packages/nodes-base/nodes/Webhook/description.ts | 6 ++---- 5 files changed, 11 insertions(+), 12 deletions(-) diff --git a/packages/cli/src/commands/Interfaces.d.ts b/packages/cli/src/commands/Interfaces.d.ts index 545688cc57..0e50b48830 100644 --- a/packages/cli/src/commands/Interfaces.d.ts +++ b/packages/cli/src/commands/Interfaces.d.ts @@ -21,7 +21,7 @@ interface IExecutionResult { finished: boolean; executionStatus: ExecutionStatus; error?: string; - changes?: string; + changes?: object; coveredNodes: { [nodeType: string]: number; }; diff --git a/packages/cli/src/commands/executeBatch.ts b/packages/cli/src/commands/executeBatch.ts index ad1840abdf..0903fc66fc 100644 --- a/packages/cli/src/commands/executeBatch.ts +++ b/packages/cli/src/commands/executeBatch.ts @@ -2,8 +2,8 @@ import fs from 'fs'; import os from 'os'; import { flags } from '@oclif/command'; -import type { ITaskData } from 'n8n-workflow'; -import { sleep } from 'n8n-workflow'; +import type { IRun, ITaskData } from 'n8n-workflow'; +import { jsonParse, sleep } from 'n8n-workflow'; import { sep } from 'path'; import { diff } from 'json-diff'; import pick from 'lodash/pick'; @@ -778,9 +778,9 @@ export class ExecuteBatch extends BaseCommand { }${workflowData.id}-snapshot.json`; if (fs.existsSync(fileName)) { const contents = fs.readFileSync(fileName, { encoding: 'utf-8' }); - const expected = JSON.parse(contents); - const recieved = JSON.parse(serializedData); - const changes = diff(expected, recieved, { keysOnly: true }); + const expected = jsonParse(contents); + const received = jsonParse(serializedData); + const changes = diff(expected, received, { keysOnly: true }) as object; if (changes !== undefined) { // If we had only additions with no removals diff --git a/packages/nodes-base/nodes/Sendy/Sendy.node.ts b/packages/nodes-base/nodes/Sendy/Sendy.node.ts index 3bb2055a6c..0e8236c68c 100644 --- a/packages/nodes-base/nodes/Sendy/Sendy.node.ts +++ b/packages/nodes-base/nodes/Sendy/Sendy.node.ts @@ -102,7 +102,7 @@ export class Sendy implements INodeType { }; if (brandId) { - body.brand_id = brandId as string; + body.brand_id = brandId; } if (additionalFields.plainText) { diff --git a/packages/nodes-base/nodes/Strava/ActivityDescription.ts b/packages/nodes-base/nodes/Strava/ActivityDescription.ts index d6a0f147a1..ddf7179ce4 100644 --- a/packages/nodes-base/nodes/Strava/ActivityDescription.ts +++ b/packages/nodes-base/nodes/Strava/ActivityDescription.ts @@ -234,10 +234,11 @@ export const activityFields: INodeProperties[] = [ 'Identifier for the gear associated with the activity. ‘none’ clears gear from activity.', }, { - displayName: 'Mute activity', + displayName: 'Mute Activity', name: 'hide_from_home', type: 'boolean', default: false, + // eslint-disable-next-line n8n-nodes-base/node-param-description-boolean-without-whether description: 'Do not publish to Home or Club feeds', }, { diff --git a/packages/nodes-base/nodes/Webhook/description.ts b/packages/nodes-base/nodes/Webhook/description.ts index 4fd3a5bb17..33be6f5ae9 100644 --- a/packages/nodes-base/nodes/Webhook/description.ts +++ b/packages/nodes-base/nodes/Webhook/description.ts @@ -16,7 +16,7 @@ export const defaultWebhookDescription: IWebhookDescription = { }; export const credentialsProperty = ( - propertyName: string = 'authentication', + propertyName = 'authentication', ): INodeTypeDescription['credentials'] => [ { name: 'httpBasicAuth', @@ -38,9 +38,7 @@ export const credentialsProperty = ( }, ]; -export const authenticationProperty = ( - propertyName: string = 'authentication', -): INodeProperties => ({ +export const authenticationProperty = (propertyName = 'authentication'): INodeProperties => ({ displayName: 'Authentication', name: propertyName, type: 'options',