Skip to content

Commit

Permalink
fix linting issues in node-base
Browse files Browse the repository at this point in the history
  • Loading branch information
RicardoE105 committed Aug 28, 2024
1 parent d9ea284 commit 045512d
Show file tree
Hide file tree
Showing 36 changed files with 44 additions and 72 deletions.
4 changes: 2 additions & 2 deletions packages/nodes-base/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,13 @@ module.exports = {
'n8n-nodes-base/node-class-description-display-name-unsuffixed-trigger-node': 'error',
'n8n-nodes-base/node-class-description-empty-string': 'error',
'n8n-nodes-base/node-class-description-icon-not-svg': 'error',
'n8n-nodes-base/node-class-description-inputs-wrong-regular-node': 'error',
'n8n-nodes-base/node-class-description-inputs-wrong-regular-node': 'off',
'n8n-nodes-base/node-class-description-inputs-wrong-trigger-node': 'error',
'n8n-nodes-base/node-class-description-missing-subtitle': 'error',
'n8n-nodes-base/node-class-description-non-core-color-present': 'error',
'n8n-nodes-base/node-class-description-name-miscased': 'error',
'n8n-nodes-base/node-class-description-name-unsuffixed-trigger-node': 'error',
'n8n-nodes-base/node-class-description-outputs-wrong': 'error',
'n8n-nodes-base/node-class-description-outputs-wrong': 'off',
'n8n-nodes-base/node-dirname-against-convention': 'error',
'n8n-nodes-base/node-execute-block-double-assertion-for-items': 'error',
'n8n-nodes-base/node-execute-block-wrong-error-thrown': 'error',
Expand Down
3 changes: 1 addition & 2 deletions packages/nodes-base/nodes/AgileCrm/AgileCrm.node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ import type {
INodeType,
INodeTypeDescription,
} from 'n8n-workflow';
import { NodeConnectionType } from 'n8n-workflow';
import { jsonParse, NodeOperationError } from 'n8n-workflow';
import { NodeConnectionType, jsonParse, NodeOperationError } from 'n8n-workflow';

import { contactFields, contactOperations } from './ContactDescription';

Expand Down
2 changes: 1 addition & 1 deletion packages/nodes-base/nodes/Airtable/v1/AirtableV1.node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import type {
INodeTypeBaseDescription,
IHttpRequestMethods,
} from 'n8n-workflow';
import { NodeConnectionType , NodeOperationError } from 'n8n-workflow';
import { NodeConnectionType, NodeOperationError } from 'n8n-workflow';

import { oldVersionNotice } from '../../../utils/descriptions';
import { generatePairedItemData } from '../../../utils/utilities';
Expand Down
3 changes: 1 addition & 2 deletions packages/nodes-base/nodes/Asana/Asana.node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ import type {
INodeTypeDescription,
JsonObject,
} from 'n8n-workflow';
import { NodeConnectionType } from 'n8n-workflow';
import { NodeApiError, NodeOperationError } from 'n8n-workflow';
import { NodeConnectionType, NodeApiError, NodeOperationError } from 'n8n-workflow';

import moment from 'moment-timezone';

Expand Down
3 changes: 1 addition & 2 deletions packages/nodes-base/nodes/Aws/AwsLambda.node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ import type {
INodeTypeDescription,
JsonObject,
} from 'n8n-workflow';
import { NodeConnectionType } from 'n8n-workflow';
import { NodeApiError } from 'n8n-workflow';
import { NodeConnectionType, NodeApiError } from 'n8n-workflow';

import { awsApiRequestREST } from './GenericFunctions';

Expand Down
3 changes: 1 addition & 2 deletions packages/nodes-base/nodes/Coda/Coda.node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ import type {
INodeTypeDescription,
JsonObject,
} from 'n8n-workflow';
import { NodeConnectionType } from 'n8n-workflow';
import { NodeApiError } from 'n8n-workflow';
import { NodeConnectionType, NodeApiError } from 'n8n-workflow';
import { codaApiRequest, codaApiRequestAllItems } from './GenericFunctions';
import { tableFields, tableOperations } from './TableDescription';
import { formulaFields, formulaOperations } from './FormulaDescription';
Expand Down
3 changes: 1 addition & 2 deletions packages/nodes-base/nodes/Dropcontact/Dropcontact.node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ import type {
INodeType,
INodeTypeDescription,
} from 'n8n-workflow';
import { NodeConnectionType } from 'n8n-workflow';
import { NodeApiError } from 'n8n-workflow';
import { NodeConnectionType, NodeApiError } from 'n8n-workflow';

import { dropcontactApiRequest, mapPairedItemsFrom } from './GenericFunction';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ import type {
INodeTypeDescription,
JsonObject,
} from 'n8n-workflow';
import { NodeConnectionType } from 'n8n-workflow';
import { jsonParse, NodeApiError } from 'n8n-workflow';
import { NodeConnectionType, jsonParse, NodeApiError } from 'n8n-workflow';

import omit from 'lodash/omit';
import {
Expand Down
3 changes: 1 addition & 2 deletions packages/nodes-base/nodes/Flow/Flow.node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ import type {
INodeTypeDescription,
JsonObject,
} from 'n8n-workflow';
import { NodeConnectionType } from 'n8n-workflow';
import { NodeApiError } from 'n8n-workflow';
import { NodeConnectionType, NodeApiError } from 'n8n-workflow';
import { flowApiRequest, FlowApiRequestAllItems } from './GenericFunctions';
import { taskFields, taskOperations } from './TaskDescription';
import type { ITask, TaskInfo } from './TaskInterface';
Expand Down
3 changes: 1 addition & 2 deletions packages/nodes-base/nodes/Function/Function.node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ import type {
INodeType,
INodeTypeDescription,
} from 'n8n-workflow';
import { NodeConnectionType } from 'n8n-workflow';
import { deepCopy, NodeOperationError } from 'n8n-workflow';
import { NodeConnectionType, deepCopy, NodeOperationError } from 'n8n-workflow';
import { vmResolver } from '../Code/JavaScriptSandbox';

export class Function implements INodeType {
Expand Down
3 changes: 1 addition & 2 deletions packages/nodes-base/nodes/FunctionItem/FunctionItem.node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ import type {
INodeType,
INodeTypeDescription,
} from 'n8n-workflow';
import { NodeConnectionType } from 'n8n-workflow';
import { deepCopy, NodeOperationError } from 'n8n-workflow';
import { NodeConnectionType, deepCopy, NodeOperationError } from 'n8n-workflow';
import { vmResolver } from '../Code/JavaScriptSandbox';

export class FunctionItem implements INodeType {
Expand Down
3 changes: 1 addition & 2 deletions packages/nodes-base/nodes/Github/GithubTrigger.node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ import type {
IWebhookResponseData,
JsonObject,
} from 'n8n-workflow';
import { NodeConnectionType } from 'n8n-workflow';
import { NodeApiError, NodeOperationError } from 'n8n-workflow';
import { NodeConnectionType, NodeApiError, NodeOperationError } from 'n8n-workflow';

import { githubApiRequest } from './GenericFunctions';
import { getRepositories, getUsers } from './SearchFunctions';
Expand Down
3 changes: 1 addition & 2 deletions packages/nodes-base/nodes/Gitlab/GitlabTrigger.node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ import type {
IWebhookResponseData,
JsonObject,
} from 'n8n-workflow';
import { NodeConnectionType } from 'n8n-workflow';
import { NodeApiError } from 'n8n-workflow';
import { NodeConnectionType, NodeApiError } from 'n8n-workflow';

import { gitlabApiRequest } from './GenericFunctions';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@ import type {
INodeTypeDescription,
JsonObject,
} from 'n8n-workflow';
import { NodeConnectionType } from 'n8n-workflow';

import { NodeApiError } from 'n8n-workflow';
import { NodeConnectionType, NodeApiError } from 'n8n-workflow';

import { v4 as uuid } from 'uuid';
import { generatePairedItemData } from '../../../../utils/utilities';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ import type {
INodeTypeDescription,
JsonObject,
} from 'n8n-workflow';
import { NodeConnectionType } from 'n8n-workflow';
import { NodeApiError, NodeOperationError } from 'n8n-workflow';
import { NodeConnectionType, NodeApiError, NodeOperationError } from 'n8n-workflow';

import moment from 'moment-timezone';
import { v4 as uuid } from 'uuid';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ import type {
INodeTypeDescription,
IPollFunctions,
} from 'n8n-workflow';
import { NodeConnectionType } from 'n8n-workflow';
import { NodeApiError, NodeOperationError } from 'n8n-workflow';
import { NodeConnectionType, NodeApiError, NodeOperationError } from 'n8n-workflow';

import moment from 'moment-timezone';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ import type {
INodeType,
INodeTypeDescription,
} from 'n8n-workflow';
import { NodeConnectionType } from 'n8n-workflow';
import { NodeApiError } from 'n8n-workflow';
import { NodeConnectionType, NodeApiError } from 'n8n-workflow';

import moment from 'moment-timezone';
import { GOOGLE_DRIVE_FILE_URL_REGEX, GOOGLE_DRIVE_FOLDER_URL_REGEX } from '../constants';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ import type {
INodeType,
INodeTypeDescription,
} from 'n8n-workflow';
import { NodeConnectionType } from 'n8n-workflow';
import { jsonParse } from 'n8n-workflow';
import { NodeConnectionType, jsonParse } from 'n8n-workflow';

import { generatePairedItemData } from '../../../../utils/utilities';
import {
Expand Down
3 changes: 1 addition & 2 deletions packages/nodes-base/nodes/Google/YouTube/YouTube.node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ import type {
INodeType,
INodeTypeDescription,
} from 'n8n-workflow';
import { NodeConnectionType } from 'n8n-workflow';
import { BINARY_ENCODING, NodeOperationError } from 'n8n-workflow';
import { NodeConnectionType, BINARY_ENCODING, NodeOperationError } from 'n8n-workflow';

import { googleApiRequest, googleApiRequestAllItems } from './GenericFunctions';

Expand Down
3 changes: 1 addition & 2 deletions packages/nodes-base/nodes/Grafana/Grafana.node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ import type {
INodeType,
INodeTypeDescription,
} from 'n8n-workflow';
import { NodeConnectionType } from 'n8n-workflow';
import { NodeApiError } from 'n8n-workflow';
import { NodeConnectionType, NodeApiError } from 'n8n-workflow';

import { deriveUid, grafanaApiRequest, throwOnEmptyUpdate } from './GenericFunctions';

Expand Down
3 changes: 1 addition & 2 deletions packages/nodes-base/nodes/HelpScout/HelpScoutTrigger.node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ import type {
INodeTypeDescription,
IWebhookResponseData,
} from 'n8n-workflow';
import { NodeConnectionType } from 'n8n-workflow';
import { randomString } from 'n8n-workflow';
import { NodeConnectionType, randomString } from 'n8n-workflow';

import { helpscoutApiRequest, helpscoutApiRequestAllItems } from './GenericFunctions';

Expand Down
3 changes: 1 addition & 2 deletions packages/nodes-base/nodes/HtmlExtract/HtmlExtract.node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ import type {
INodeType,
INodeTypeDescription,
} from 'n8n-workflow';
import { NodeConnectionType } from 'n8n-workflow';
import { NodeOperationError } from 'n8n-workflow';
import { NodeConnectionType, NodeOperationError } from 'n8n-workflow';

import get from 'lodash/get';

Expand Down
3 changes: 1 addition & 2 deletions packages/nodes-base/nodes/Intercom/Intercom.node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ import type {
INodeTypeDescription,
JsonObject,
} from 'n8n-workflow';
import { NodeConnectionType } from 'n8n-workflow';
import { NodeApiError, NodeOperationError } from 'n8n-workflow';
import { NodeConnectionType, NodeApiError, NodeOperationError } from 'n8n-workflow';
import { leadFields, leadOperations } from './LeadDescription';
import { intercomApiRequest, intercomApiRequestAllItems, validateJSON } from './GenericFunctions';
import type { IAvatar, ILead, ILeadCompany } from './LeadInterface';
Expand Down
3 changes: 1 addition & 2 deletions packages/nodes-base/nodes/Iterable/Iterable.node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ import type {
INodeTypeDescription,
JsonObject,
} from 'n8n-workflow';
import { NodeConnectionType } from 'n8n-workflow';
import { NodeApiError, NodeOperationError } from 'n8n-workflow';
import { NodeConnectionType, NodeApiError, NodeOperationError } from 'n8n-workflow';

import moment from 'moment-timezone';
import { iterableApiRequest } from './GenericFunctions';
Expand Down
4 changes: 2 additions & 2 deletions packages/nodes-base/nodes/Lemlist/LemlistTrigger.node.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import {
import type {
IHookFunctions,
IWebhookFunctions,
IDataObject,
ILoadOptionsFunctions,
INodeType,
INodeTypeDescription,
IWebhookResponseData,
NodeConnectionType,
} from 'n8n-workflow';
import { NodeConnectionType } from 'n8n-workflow';

import { getEvents, lemlistApiRequest } from './GenericFunctions';

Expand Down
3 changes: 1 addition & 2 deletions packages/nodes-base/nodes/Magento/Magento2.node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ import type {
INodeType,
INodeTypeDescription,
} from 'n8n-workflow';
import { NodeConnectionType } from 'n8n-workflow';
import { NodeApiError } from 'n8n-workflow';
import { NodeConnectionType, NodeApiError } from 'n8n-workflow';

import { capitalCase } from 'change-case';
import {
Expand Down
3 changes: 1 addition & 2 deletions packages/nodes-base/nodes/Mandrill/Mandrill.node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ import type {
INodeTypeDescription,
JsonObject,
} from 'n8n-workflow';
import { NodeConnectionType } from 'n8n-workflow';
import { NodeApiError } from 'n8n-workflow';
import { NodeConnectionType, NodeApiError } from 'n8n-workflow';

import moment from 'moment-timezone';

Expand Down
3 changes: 1 addition & 2 deletions packages/nodes-base/nodes/Markdown/Markdown.node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ import type {
INodeTypeDescription,
JsonObject,
} from 'n8n-workflow';
import { NodeConnectionType } from 'n8n-workflow';
import { deepCopy } from 'n8n-workflow';
import { NodeConnectionType, deepCopy } from 'n8n-workflow';

import { Converter } from 'showdown';

Expand Down
3 changes: 1 addition & 2 deletions packages/nodes-base/nodes/Mautic/Mautic.node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ import type {
INodeTypeDescription,
JsonObject,
} from 'n8n-workflow';
import { NodeConnectionType } from 'n8n-workflow';
import { NodeApiError, NodeOperationError } from 'n8n-workflow';
import { NodeConnectionType, NodeApiError, NodeOperationError } from 'n8n-workflow';

import { snakeCase } from 'change-case';
import { mauticApiRequest, mauticApiRequestAllItems, validateJSON } from './GenericFunctions';
Expand Down
3 changes: 1 addition & 2 deletions packages/nodes-base/nodes/RenameKeys/RenameKeys.node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ import type {
INodeType,
INodeTypeDescription,
} from 'n8n-workflow';
import { NodeConnectionType } from 'n8n-workflow';
import { deepCopy } from 'n8n-workflow';
import { NodeConnectionType, deepCopy } from 'n8n-workflow';

import get from 'lodash/get';
import set from 'lodash/set';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ import type {
INodeTypeDescription,
IPairedItemData,
} from 'n8n-workflow';
import { NodeConnectionType } from 'n8n-workflow';
import { deepCopy } from 'n8n-workflow';
import { NodeConnectionType, deepCopy } from 'n8n-workflow';

export class SplitInBatchesV2 implements INodeType {
description: INodeTypeDescription = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ import type {
INodeTypeDescription,
IPairedItemData,
} from 'n8n-workflow';
import { NodeConnectionType } from 'n8n-workflow';
import { deepCopy } from 'n8n-workflow';
import { NodeConnectionType, deepCopy } from 'n8n-workflow';

export class SplitInBatchesV3 implements INodeType {
description: INodeTypeDescription = {
Expand Down
8 changes: 6 additions & 2 deletions packages/nodes-base/nodes/Transform/SplitOut/SplitOut.node.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
import get from 'lodash/get';
import unset from 'lodash/unset';
import { NodeOperationError, deepCopy, NodeExecutionOutput } from 'n8n-workflow';
import {
NodeOperationError,
deepCopy,
NodeExecutionOutput,
NodeConnectionType,
} from 'n8n-workflow';
import type {
IBinaryData,
IDataObject,
Expand All @@ -10,7 +15,6 @@ import type {
INodeTypeDescription,
NodeExecutionHint,
} from 'n8n-workflow';
import { NodeConnectionType } from 'n8n-workflow';
import { prepareFieldsArray } from '../utils/utils';

export class SplitOut implements INodeType {
Expand Down
3 changes: 1 addition & 2 deletions packages/nodes-base/nodes/Vero/Vero.node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ import type {
INodeTypeDescription,
JsonObject,
} from 'n8n-workflow';
import { NodeConnectionType } from 'n8n-workflow';
import { NodeApiError } from 'n8n-workflow';
import { NodeConnectionType, NodeApiError } from 'n8n-workflow';
import { validateJSON, veroApiRequest } from './GenericFunctions';
import { userFields, userOperations } from './UserDescription';
import { eventFields, eventOperations } from './EventDescripion';
Expand Down
4 changes: 2 additions & 2 deletions packages/nodes-base/nodes/Wise/WiseTrigger.node.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import { createVerify } from 'crypto';
import {
import type {
IHookFunctions,
IWebhookFunctions,
IDataObject,
ILoadOptionsFunctions,
INodeType,
INodeTypeDescription,
IWebhookResponseData,
NodeConnectionType,
} from 'n8n-workflow';
import { NodeConnectionType } from 'n8n-workflow';

import type { Profile } from './GenericFunctions';
import { getTriggerName, livePublicKey, testPublicKey, wiseApiRequest } from './GenericFunctions';
Expand Down
3 changes: 1 addition & 2 deletions packages/nodes-base/nodes/Zendesk/Zendesk.node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ import type {
INodeTypeDescription,
JsonObject,
} from 'n8n-workflow';
import { NodeConnectionType } from 'n8n-workflow';
import { NodeApiError, NodeOperationError } from 'n8n-workflow';
import { NodeApiError, NodeOperationError, NodeConnectionType } from 'n8n-workflow';

import { validateJSON, zendeskApiRequest, zendeskApiRequestAllItems } from './GenericFunctions';

Expand Down

0 comments on commit 045512d

Please sign in to comment.