From 26b07e28f05268ceda4e5db10e7ef95a7250e45d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Iv=C3=A1n=20Ovejero?= Date: Mon, 12 Sep 2022 09:25:39 +0200 Subject: [PATCH] refactor(nodes-base): Apply lint rule `node-param-display-name-not-first-position` (#4073) * :shirt: Enable rule * :shirt: Apply rule --- .eslintrc.js | 1 + .../nodes-base/nodes/PostBin/BinDescription.ts | 2 +- .../nodes/PostBin/RequestDescription.ts | 6 +++--- .../nodes/SendInBlue/EmailDescription.ts | 10 +++++----- .../nodes/SendInBlue/SendInBlueTrigger.node.ts | 2 +- .../nodes-base/nodes/Spotify/Spotify.node.ts | 16 ++++++++-------- .../descriptions/ObservableDescription.ts | 2 +- 7 files changed, 20 insertions(+), 19 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 7a367860fa..7db812ea9d 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -446,6 +446,7 @@ module.exports = { 'n8n-nodes-base/node-param-description-wrong-for-simplify': 'error', 'n8n-nodes-base/node-param-description-wrong-for-upsert': 'error', 'n8n-nodes-base/node-param-display-name-excess-inner-whitespace': 'error', + 'n8n-nodes-base/node-param-display-name-not-first-position': 'error', 'n8n-nodes-base/node-param-display-name-miscased': 'error', 'n8n-nodes-base/node-param-display-name-miscased-id': 'error', 'n8n-nodes-base/node-param-display-name-untrimmed': 'error', diff --git a/packages/nodes-base/nodes/PostBin/BinDescription.ts b/packages/nodes-base/nodes/PostBin/BinDescription.ts index ea9a5c6255..33c95b58b7 100644 --- a/packages/nodes-base/nodes/PostBin/BinDescription.ts +++ b/packages/nodes-base/nodes/PostBin/BinDescription.ts @@ -75,8 +75,8 @@ export const binOperations: INodeProperties[] = [ // Properties of the `Bin` resource export const binFields: INodeProperties[] = [ { - name: 'binId', displayName: 'Bin ID', + name: 'binId', type: 'string', default: '', required: true, diff --git a/packages/nodes-base/nodes/PostBin/RequestDescription.ts b/packages/nodes-base/nodes/PostBin/RequestDescription.ts index b0765a0e5d..d007d0f95e 100644 --- a/packages/nodes-base/nodes/PostBin/RequestDescription.ts +++ b/packages/nodes-base/nodes/PostBin/RequestDescription.ts @@ -86,8 +86,8 @@ export const requestOperations: INodeProperties[] = [ // Properties of the `Request` resource export const requestFields: INodeProperties[] = [ { - name: 'binId', displayName: 'Bin ID', + name: 'binId', type: 'string', default: '', required: true, @@ -100,8 +100,8 @@ export const requestFields: INodeProperties[] = [ description: 'Unique identifier for each bin', }, { - name: 'binContent', displayName: 'Bin Content', + name: 'binContent', type: 'string', default: '', typeOptions: { @@ -122,8 +122,8 @@ export const requestFields: INodeProperties[] = [ }, }, { - name: 'requestId', displayName: 'Request ID', + name: 'requestId', type: 'string', default: '', required: true, diff --git a/packages/nodes-base/nodes/SendInBlue/EmailDescription.ts b/packages/nodes-base/nodes/SendInBlue/EmailDescription.ts index 453d8cbd5f..241a4e56a3 100644 --- a/packages/nodes-base/nodes/SendInBlue/EmailDescription.ts +++ b/packages/nodes-base/nodes/SendInBlue/EmailDescription.ts @@ -168,8 +168,8 @@ const sendHtmlEmailFields: INodeProperties[] = [ displayName: 'Attachment Data', values: [ { - default: '', displayName: 'Input Data Field Name', + default: '', name: 'binaryPropertyName', type: 'string', description: @@ -196,8 +196,8 @@ const sendHtmlEmailFields: INodeProperties[] = [ displayName: 'Receipient', values: [ { - name: 'bcc', displayName: 'Receipient', + name: 'bcc', type: 'string', default: '', }, @@ -222,8 +222,8 @@ const sendHtmlEmailFields: INodeProperties[] = [ displayName: 'Receipient', values: [ { - name: 'cc', displayName: 'Receipient', + name: 'cc', type: 'string', default: '', }, @@ -249,8 +249,8 @@ const sendHtmlEmailFields: INodeProperties[] = [ name: 'tags', values: [ { - default: '', displayName: 'Tag', + default: '', name: 'tag', type: 'string', }, @@ -398,8 +398,8 @@ const sendHtmlTemplateEmailFields: INodeProperties[] = [ name: 'tags', values: [ { - default: '', displayName: 'Tag', + default: '', name: 'tag', type: 'string', }, diff --git a/packages/nodes-base/nodes/SendInBlue/SendInBlueTrigger.node.ts b/packages/nodes-base/nodes/SendInBlue/SendInBlueTrigger.node.ts index 83cb84d32f..ed7c8b5b2d 100644 --- a/packages/nodes-base/nodes/SendInBlue/SendInBlueTrigger.node.ts +++ b/packages/nodes-base/nodes/SendInBlue/SendInBlueTrigger.node.ts @@ -40,8 +40,8 @@ export class SendInBlueTrigger implements INodeType { ], properties: [ { - default: 'transactional', displayName: 'Resource', + default: 'transactional', name: 'type', options: [ { name: 'Inbound', value: 'inbound' }, diff --git a/packages/nodes-base/nodes/Spotify/Spotify.node.ts b/packages/nodes-base/nodes/Spotify/Spotify.node.ts index 7ad1a45f38..05f2c86631 100644 --- a/packages/nodes-base/nodes/Spotify/Spotify.node.ts +++ b/packages/nodes-base/nodes/Spotify/Spotify.node.ts @@ -377,18 +377,18 @@ export class Spotify implements INodeType { description: 'Get a playlist by URI or ID', action: 'Get a playlist', }, + { + name: "Get the User's Playlists", + value: 'getUserPlaylists', + description: "Get a user's playlists", + action: "Get a user's playlists", + }, { name: 'Get Tracks', value: 'getTracks', description: "Get a playlist's tracks by URI or ID", action: "Get a playlist's tracks by URI or ID", }, - { - name: `Get the User's Playlists`, - value: 'getUserPlaylists', - description: "Get a user's playlists", - action: "Get a user's playlists", - }, { name: 'Remove an Item', value: 'delete', @@ -396,7 +396,7 @@ export class Spotify implements INodeType { action: 'Remove an item from a playlist', }, { - name: `Search`, + name: 'Search', value: 'search', description: 'Search playlists by keyword', action: 'Search playlists by keyword', @@ -1322,4 +1322,4 @@ export class Spotify implements INodeType { return this.prepareOutputData(returnData); } -} +} \ No newline at end of file diff --git a/packages/nodes-base/nodes/TheHive/descriptions/ObservableDescription.ts b/packages/nodes-base/nodes/TheHive/descriptions/ObservableDescription.ts index aebf0dee2b..486617fb6e 100644 --- a/packages/nodes-base/nodes/TheHive/descriptions/ObservableDescription.ts +++ b/packages/nodes-base/nodes/TheHive/descriptions/ObservableDescription.ts @@ -518,8 +518,8 @@ export const observableFields: INodeProperties[] = [ default: false, }, { - name: 'Status', displayName: 'Status', + name: 'Status', type: 'options', default: '', options: [