From d6b930c7bebeab7f0534b98dbdca40330585217c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Iv=C3=A1n=20Ovejero?= Date: Mon, 12 Sep 2022 09:36:50 +0200 Subject: [PATCH] refactor(nodes-base): Apply lint rule `node-param-type-options-missing-from-password` (#4072) * :shirt: Enable rule * :shirt: Apply rule --- .eslintrc.js | 1 + packages/nodes-base/nodes/Box/FolderDescription.ts | 1 + .../nodes/Cisco/Webex/descriptions/MeetingDescription.ts | 2 ++ .../ElasticSecurity/descriptions/ConnectorDescription.ts | 1 + .../nodes-base/nodes/Google/GSuiteAdmin/UserDescription.ts | 1 + .../nodes-base/nodes/HaloPSA/descriptions/UserDescription.ts | 1 + packages/nodes-base/nodes/Magento/GenericFunctions.ts | 1 + packages/nodes-base/nodes/Metabase/DatabasesDescription.ts | 1 + packages/nodes-base/nodes/NextCloud/NextCloud.node.ts | 1 + .../nodes-base/nodes/Splunk/descriptions/UserDescription.ts | 2 ++ .../nodes/UptimeRobot/PublicStatusPageDescription.ts | 2 ++ packages/nodes-base/nodes/WooCommerce/descriptions/shared.ts | 1 + packages/nodes-base/nodes/Wordpress/PostDescription.ts | 3 +++ packages/nodes-base/nodes/Wordpress/UserDescription.ts | 2 ++ packages/nodes-base/nodes/Zoom/MeetingDescription.ts | 2 ++ packages/nodes-base/nodes/Zoom/WebinarDescription.ts | 2 ++ packages/nodes-base/nodes/Zulip/UserDescription.ts | 1 + 17 files changed, 25 insertions(+) diff --git a/.eslintrc.js b/.eslintrc.js index 7db812ea9d..347f9bbdf6 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -472,6 +472,7 @@ module.exports = { 'n8n-nodes-base/node-param-resource-with-plural-option': 'error', 'n8n-nodes-base/node-param-resource-without-no-data-expression': 'error', 'n8n-nodes-base/node-param-type-options-missing-from-limit': 'error', + 'n8n-nodes-base/node-param-type-options-missing-from-password': 'error', }, }, ], diff --git a/packages/nodes-base/nodes/Box/FolderDescription.ts b/packages/nodes-base/nodes/Box/FolderDescription.ts index 08b60c0a19..024efbaafe 100644 --- a/packages/nodes-base/nodes/Box/FolderDescription.ts +++ b/packages/nodes-base/nodes/Box/FolderDescription.ts @@ -734,6 +734,7 @@ export const folderFields: INodeProperties[] = [ displayName: 'Password', name: 'password', type: 'string', + typeOptions: { password: true }, displayOptions: { show: { access: ['open'], diff --git a/packages/nodes-base/nodes/Cisco/Webex/descriptions/MeetingDescription.ts b/packages/nodes-base/nodes/Cisco/Webex/descriptions/MeetingDescription.ts index f026ae5588..ab0da7e38b 100644 --- a/packages/nodes-base/nodes/Cisco/Webex/descriptions/MeetingDescription.ts +++ b/packages/nodes-base/nodes/Cisco/Webex/descriptions/MeetingDescription.ts @@ -450,6 +450,7 @@ export const meetingFields: INodeProperties[] = [ displayName: 'Password', name: 'password', type: 'string', + typeOptions: { password: true }, default: '', description: "Meeting password. It's required when the meeting is protected by a password and the current user is not privileged to view it if they are not a host, co-host or invitee of the meeting.", @@ -828,6 +829,7 @@ export const meetingFields: INodeProperties[] = [ displayName: 'Password', name: 'password', type: 'string', + typeOptions: { password: true }, default: '', description: "Meeting password. Must conform to the site's password complexity settings. If not specified, a random password conforming to the site's password rules will be generated automatically", diff --git a/packages/nodes-base/nodes/Elastic/ElasticSecurity/descriptions/ConnectorDescription.ts b/packages/nodes-base/nodes/Elastic/ElasticSecurity/descriptions/ConnectorDescription.ts index aee33d5e2f..d18913b697 100644 --- a/packages/nodes-base/nodes/Elastic/ElasticSecurity/descriptions/ConnectorDescription.ts +++ b/packages/nodes-base/nodes/Elastic/ElasticSecurity/descriptions/ConnectorDescription.ts @@ -149,6 +149,7 @@ export const connectorFields: INodeProperties[] = [ name: 'password', description: 'ServiceNow ITSM password', type: 'string', + typeOptions: { password: true }, required: true, default: '', displayOptions: { diff --git a/packages/nodes-base/nodes/Google/GSuiteAdmin/UserDescription.ts b/packages/nodes-base/nodes/Google/GSuiteAdmin/UserDescription.ts index c2ae507d3d..d98848ca4f 100644 --- a/packages/nodes-base/nodes/Google/GSuiteAdmin/UserDescription.ts +++ b/packages/nodes-base/nodes/Google/GSuiteAdmin/UserDescription.ts @@ -702,6 +702,7 @@ export const userFields: INodeProperties[] = [ displayName: 'Password', name: 'password', type: 'string', + typeOptions: { password: true }, default: '', description: 'Stores the password for the user account. A minimum of 8 characters is required. The maximum length is 100 characters.', diff --git a/packages/nodes-base/nodes/HaloPSA/descriptions/UserDescription.ts b/packages/nodes-base/nodes/HaloPSA/descriptions/UserDescription.ts index 9186d80167..5f2fff8a32 100644 --- a/packages/nodes-base/nodes/HaloPSA/descriptions/UserDescription.ts +++ b/packages/nodes-base/nodes/HaloPSA/descriptions/UserDescription.ts @@ -115,6 +115,7 @@ export const userFields: INodeProperties[] = [ displayName: 'Password', name: 'password', type: 'string', + typeOptions: { password: true }, default: '', description: 'Your new password must be at least 8 characters long and contain at least one letter, one number or symbol, one upper case character and one lower case character', diff --git a/packages/nodes-base/nodes/Magento/GenericFunctions.ts b/packages/nodes-base/nodes/Magento/GenericFunctions.ts index 89ac48223b..b1c386a5d3 100644 --- a/packages/nodes-base/nodes/Magento/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Magento/GenericFunctions.ts @@ -641,6 +641,7 @@ export function getCustomerOptionalFields(): INodeProperties[] { displayName: 'Password', name: 'password', type: 'string', + typeOptions: { password: true }, default: '', }, { diff --git a/packages/nodes-base/nodes/Metabase/DatabasesDescription.ts b/packages/nodes-base/nodes/Metabase/DatabasesDescription.ts index fe646d2a1b..4b17334c83 100644 --- a/packages/nodes-base/nodes/Metabase/DatabasesDescription.ts +++ b/packages/nodes-base/nodes/Metabase/DatabasesDescription.ts @@ -211,6 +211,7 @@ export const databasesFields: INodeProperties[] = [ displayName: 'Password', name: 'password', type: 'string', + typeOptions: { password: true }, required: true, placeholder: 'password', displayOptions: { diff --git a/packages/nodes-base/nodes/NextCloud/NextCloud.node.ts b/packages/nodes-base/nodes/NextCloud/NextCloud.node.ts index 94e9b1e8f0..e736f87191 100644 --- a/packages/nodes-base/nodes/NextCloud/NextCloud.node.ts +++ b/packages/nodes-base/nodes/NextCloud/NextCloud.node.ts @@ -557,6 +557,7 @@ export class NextCloud implements INodeType { displayName: 'Password', name: 'password', type: 'string', + typeOptions: { password: true }, displayOptions: { show: { '/resource': ['file', 'folder'], diff --git a/packages/nodes-base/nodes/Splunk/descriptions/UserDescription.ts b/packages/nodes-base/nodes/Splunk/descriptions/UserDescription.ts index d15d842d92..76de2bccd6 100644 --- a/packages/nodes-base/nodes/Splunk/descriptions/UserDescription.ts +++ b/packages/nodes-base/nodes/Splunk/descriptions/UserDescription.ts @@ -87,6 +87,7 @@ export const userFields: INodeProperties[] = [ displayName: 'Password', name: 'password', type: 'string', + typeOptions: { password: true }, required: true, default: '', displayOptions: { @@ -244,6 +245,7 @@ export const userFields: INodeProperties[] = [ displayName: 'Password', name: 'password', type: 'string', + typeOptions: { password: true }, default: '', }, { diff --git a/packages/nodes-base/nodes/UptimeRobot/PublicStatusPageDescription.ts b/packages/nodes-base/nodes/UptimeRobot/PublicStatusPageDescription.ts index d8833e907c..1f2fca8070 100644 --- a/packages/nodes-base/nodes/UptimeRobot/PublicStatusPageDescription.ts +++ b/packages/nodes-base/nodes/UptimeRobot/PublicStatusPageDescription.ts @@ -105,6 +105,7 @@ export const publicStatusPageFields: INodeProperties[] = [ displayName: 'Password', name: 'password', type: 'string', + typeOptions: { password: true }, default: '', description: 'The password for the status page', }, @@ -267,6 +268,7 @@ export const publicStatusPageFields: INodeProperties[] = [ displayName: 'Password', name: 'password', type: 'string', + typeOptions: { password: true }, default: '', description: 'The password for the status page', }, diff --git a/packages/nodes-base/nodes/WooCommerce/descriptions/shared.ts b/packages/nodes-base/nodes/WooCommerce/descriptions/shared.ts index 834867b5c9..01d2c4dbf3 100644 --- a/packages/nodes-base/nodes/WooCommerce/descriptions/shared.ts +++ b/packages/nodes-base/nodes/WooCommerce/descriptions/shared.ts @@ -125,6 +125,7 @@ const customerUpdateOptions: INodeProperties[] = [ displayName: 'Password', name: 'password', type: 'string', + typeOptions: { password: true }, displayOptions: { show: { '/resource': ['customer'], diff --git a/packages/nodes-base/nodes/Wordpress/PostDescription.ts b/packages/nodes-base/nodes/Wordpress/PostDescription.ts index 220d547de7..804471aa3e 100644 --- a/packages/nodes-base/nodes/Wordpress/PostDescription.ts +++ b/packages/nodes-base/nodes/Wordpress/PostDescription.ts @@ -109,6 +109,7 @@ export const postFields: INodeProperties[] = [ displayName: 'Password', name: 'password', type: 'string', + typeOptions: { password: true }, default: '', description: 'A password to protect access to the content and excerpt', }, @@ -390,6 +391,7 @@ export const postFields: INodeProperties[] = [ displayName: 'Password', name: 'password', type: 'string', + typeOptions: { password: true }, default: '', description: 'A password to protect access to the content and excerpt', }, @@ -636,6 +638,7 @@ export const postFields: INodeProperties[] = [ displayName: 'Password', name: 'password', type: 'string', + typeOptions: { password: true }, default: '', description: 'The password for the post if it is password protected', }, diff --git a/packages/nodes-base/nodes/Wordpress/UserDescription.ts b/packages/nodes-base/nodes/Wordpress/UserDescription.ts index 9fc9fde72e..2741257a0a 100644 --- a/packages/nodes-base/nodes/Wordpress/UserDescription.ts +++ b/packages/nodes-base/nodes/Wordpress/UserDescription.ts @@ -125,6 +125,7 @@ export const userFields: INodeProperties[] = [ displayName: 'Password', name: 'password', type: 'string', + typeOptions: { password: true }, required: true, default: '', displayOptions: { @@ -251,6 +252,7 @@ export const userFields: INodeProperties[] = [ displayName: 'Password', name: 'password', type: 'string', + typeOptions: { password: true }, default: '', description: 'Password for the user (never included)', }, diff --git a/packages/nodes-base/nodes/Zoom/MeetingDescription.ts b/packages/nodes-base/nodes/Zoom/MeetingDescription.ts index 5f0fa8adfa..0f7353c60d 100644 --- a/packages/nodes-base/nodes/Zoom/MeetingDescription.ts +++ b/packages/nodes-base/nodes/Zoom/MeetingDescription.ts @@ -104,6 +104,7 @@ export const meetingFields: INodeProperties[] = [ displayName: 'Password', name: 'password', type: 'string', + typeOptions: { password: true }, default: '', description: 'Password to join the meeting with maximum 10 characters', }, @@ -510,6 +511,7 @@ export const meetingFields: INodeProperties[] = [ displayName: 'Password', name: 'password', type: 'string', + typeOptions: { password: true }, default: '', description: 'Password to join the meeting with maximum 10 characters', }, diff --git a/packages/nodes-base/nodes/Zoom/WebinarDescription.ts b/packages/nodes-base/nodes/Zoom/WebinarDescription.ts index c1879bfd21..860456a796 100644 --- a/packages/nodes-base/nodes/Zoom/WebinarDescription.ts +++ b/packages/nodes-base/nodes/Zoom/WebinarDescription.ts @@ -177,6 +177,7 @@ export const webinarFields: INodeProperties[] = [ displayName: 'Password', name: 'password', type: 'string', + typeOptions: { password: true }, default: '', description: 'Password to join the webinar with maximum 10 characters', }, @@ -519,6 +520,7 @@ export const webinarFields: INodeProperties[] = [ displayName: 'Password', name: 'password', type: 'string', + typeOptions: { password: true }, default: '', description: 'Password to join the webinar with maximum 10 characters', }, diff --git a/packages/nodes-base/nodes/Zulip/UserDescription.ts b/packages/nodes-base/nodes/Zulip/UserDescription.ts index fb89d243a5..e50ba27cd9 100644 --- a/packages/nodes-base/nodes/Zulip/UserDescription.ts +++ b/packages/nodes-base/nodes/Zulip/UserDescription.ts @@ -84,6 +84,7 @@ export const userFields: INodeProperties[] = [ displayName: 'Password', name: 'password', type: 'string', + typeOptions: { password: true }, required: true, displayOptions: { show: {