Skip to content

Commit 88dea33

Browse files
ivovagobrechkrynblemichael-radencybrianinoa
authored
refactor: Apply more eslint-plugin-n8n-nodes-base rules (n8n-io#3534)
* ⚡ Update `lintfix` script * ⚡ Run baseline `lintfix` * 🔥 Remove unneeded exceptions (n8n-io#3538) * 🔥 Remove exceptions for `node-param-default-wrong-for-simplify` * 🔥 Remove exceptions for `node-param-placeholder-miscased-id` * ⚡ Update version * 👕 Apply `node-param-placeholder-missing` (n8n-io#3542) * 👕 Apply `filesystem-wrong-cred-filename` (n8n-io#3543) * 👕 Apply `node-param-description-missing-from-dynamic-options` (n8n-io#3545) Co-authored-by: Iván Ovejero <ivov.src@gmail.com> * 👕 Apply `node-class-description-empty-string` (n8n-io#3546) * 👕 Apply `node-class-description-icon-not-svg` (n8n-io#3548) * 👕 Apply `filesystem-wrong-node-filename` (n8n-io#3549) Co-authored-by: Iván Ovejero <ivov.src@gmail.com> * 👕 Expand lintings to credentials (n8n-io#3550) * 👕 Apply `node-param-multi-options-type-unsorted-items` (n8n-io#3552) * ⚡ fix * ⚡ Minor fixes Co-authored-by: Michael Kret <michael.k@radency.com> * 👕 Apply `node-param-description-wrong-for-dynamic-multi-options` (n8n-io#3541) * ⚡ Add new lint rule, node-param-description-wrong-for-dynamic-multi-options * ⚡ Fix with updated linting rules * ⚡ Minor fixes Co-authored-by: Iván Ovejero <ivov.src@gmail.com> * 👕 Apply `node-param-description-boolean-without-whether` (n8n-io#3553) * ⚡ fix * Update packages/nodes-base/nodes/Clockify/ProjectDescription.ts Co-authored-by: Iván Ovejero <ivov.src@gmail.com> * 👕 Apply node-param-display-name-wrong-for-dynamic-multi-options (n8n-io#3537) * 👕 Add exceptions * 👕 Add exception * ✏️ Alphabetize rules * ⚡ Restore `lintfix` command Co-authored-by: agobrech <45268029+agobrech@users.noreply.github.com> Co-authored-by: Omar Ajoue <krynble@gmail.com> Co-authored-by: Michael Kret <michael.k@radency.com> Co-authored-by: brianinoa <54530642+brianinoa@users.noreply.github.com> Co-authored-by: Michael Kret <88898367+michael-radency@users.noreply.github.com>
1 parent 3c3b180 commit 88dea33

File tree

552 files changed

+2186
-1365
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

552 files changed

+2186
-1365
lines changed

.eslintrc.js

+28-15
Original file line numberDiff line numberDiff line change
@@ -371,10 +371,16 @@ module.exports = {
371371
},
372372
},
373373
{
374-
files: ['./packages/nodes-base/nodes/**/*.ts'],
374+
files: [
375+
'./packages/nodes-base/nodes/**/*.ts',
376+
'./packages/nodes-base/credentials/*.credentials.ts',
377+
],
375378
plugins: ['eslint-plugin-n8n-nodes-base'],
376379
rules: {
377-
'n8n-nodes-base/node-class-description-inputs-wrong-regular-node': 'error',
380+
'n8n-nodes-base/filesystem-wrong-cred-filename': 'error',
381+
'n8n-nodes-base/filesystem-wrong-node-filename': 'error',
382+
'n8n-nodes-base/node-class-description-empty-string': 'error',
383+
'n8n-nodes-base/node-class-description-icon-not-svg': 'error',
378384
'n8n-nodes-base/node-class-description-inputs-wrong-trigger-node': 'error',
379385
'n8n-nodes-base/node-class-description-missing-subtitle': 'error',
380386
'n8n-nodes-base/node-class-description-outputs-wrong': 'error',
@@ -384,58 +390,65 @@ module.exports = {
384390
'n8n-nodes-base/node-param-default-wrong-for-boolean': 'error',
385391
'n8n-nodes-base/node-param-default-wrong-for-collection': 'error',
386392
'n8n-nodes-base/node-param-default-wrong-for-fixed-collection': 'error',
393+
'n8n-nodes-base/node-param-default-wrong-for-fixed-collection': 'error',
387394
'n8n-nodes-base/node-param-default-wrong-for-multi-options': 'error',
395+
'n8n-nodes-base/node-param-default-wrong-for-number': 'error',
388396
'n8n-nodes-base/node-param-default-wrong-for-simplify': 'error',
397+
'n8n-nodes-base/node-param-default-wrong-for-string': 'error',
398+
'n8n-nodes-base/node-param-description-boolean-without-whether': 'error',
389399
'n8n-nodes-base/node-param-description-comma-separated-hyphen': 'error',
390400
'n8n-nodes-base/node-param-description-empty-string': 'error',
391401
'n8n-nodes-base/node-param-description-excess-final-period': 'error',
392402
'n8n-nodes-base/node-param-description-excess-inner-whitespace': 'error',
393403
'n8n-nodes-base/node-param-description-identical-to-display-name': 'error',
404+
'n8n-nodes-base/node-param-description-line-break-html-tag': 'error',
405+
'n8n-nodes-base/node-param-description-lowercase-first-char': 'error',
394406
'n8n-nodes-base/node-param-description-miscased-id': 'error',
395407
'n8n-nodes-base/node-param-description-miscased-json': 'error',
408+
'n8n-nodes-base/node-param-description-miscased-url': 'error',
396409
'n8n-nodes-base/node-param-description-missing-final-period': 'error',
397410
'n8n-nodes-base/node-param-description-missing-for-ignore-ssl-issues': 'error',
398411
'n8n-nodes-base/node-param-description-missing-for-return-all': 'error',
399412
'n8n-nodes-base/node-param-description-missing-for-simplify': 'error',
413+
'n8n-nodes-base/node-param-description-missing-from-dynamic-options': 'error',
400414
'n8n-nodes-base/node-param-description-missing-from-limit': 'error',
401415
'n8n-nodes-base/node-param-description-unencoded-angle-brackets': 'error',
402416
'n8n-nodes-base/node-param-description-unneeded-backticks': 'error',
403417
'n8n-nodes-base/node-param-description-untrimmed': 'error',
404418
'n8n-nodes-base/node-param-description-url-missing-protocol': 'error',
405419
'n8n-nodes-base/node-param-description-weak': 'error',
420+
'n8n-nodes-base/node-param-description-wrong-for-dynamic-multi-options': 'error',
421+
'n8n-nodes-base/node-param-description-wrong-for-dynamic-options': 'error',
406422
'n8n-nodes-base/node-param-description-wrong-for-ignore-ssl-issues': 'error',
407423
'n8n-nodes-base/node-param-description-wrong-for-limit': 'error',
408424
'n8n-nodes-base/node-param-description-wrong-for-return-all': 'error',
409425
'n8n-nodes-base/node-param-description-wrong-for-simplify': 'error',
410426
'n8n-nodes-base/node-param-description-wrong-for-upsert': 'error',
411427
'n8n-nodes-base/node-param-display-name-excess-inner-whitespace': 'error',
428+
'n8n-nodes-base/node-param-display-name-miscased': 'error',
412429
'n8n-nodes-base/node-param-display-name-miscased-id': 'error',
413430
'n8n-nodes-base/node-param-display-name-untrimmed': 'error',
431+
'n8n-nodes-base/node-param-display-name-wrong-for-dynamic-multi-options': 'error',
432+
'n8n-nodes-base/node-param-display-name-wrong-for-dynamic-options': 'error',
414433
'n8n-nodes-base/node-param-display-name-wrong-for-simplify': 'error',
415434
'n8n-nodes-base/node-param-display-name-wrong-for-update-fields': 'error',
435+
'n8n-nodes-base/node-param-min-value-wrong-for-limit': 'error',
436+
'n8n-nodes-base/node-param-multi-options-type-unsorted-items': 'error',
416437
'n8n-nodes-base/node-param-operation-without-no-data-expression': 'error',
417438
'n8n-nodes-base/node-param-option-description-identical-to-name': 'error',
418439
'n8n-nodes-base/node-param-option-name-containing-star': 'error',
419440
'n8n-nodes-base/node-param-option-name-duplicate': 'error',
420441
'n8n-nodes-base/node-param-option-name-wrong-for-get-all': 'error',
442+
'n8n-nodes-base/node-param-option-name-wrong-for-upsert': 'error',
421443
'n8n-nodes-base/node-param-option-value-duplicate': 'error',
444+
'n8n-nodes-base/node-param-options-type-unsorted-items': 'error',
445+
'n8n-nodes-base/node-param-placeholder-miscased-id': 'error',
446+
'n8n-nodes-base/node-param-placeholder-missing-email': 'error',
422447
'n8n-nodes-base/node-param-required-false': 'error',
423448
'n8n-nodes-base/node-param-resource-with-plural-option': 'error',
424449
'n8n-nodes-base/node-param-resource-without-no-data-expression': 'error',
425450
'n8n-nodes-base/node-param-type-options-missing-from-limit': 'error',
426-
'n8n-nodes-base/node-param-description-wrong-for-dynamic-options': 'error',
427-
'n8n-nodes-base/node-param-display-name-wrong-for-dynamic-options': 'error',
428-
'n8n-nodes-base/node-param-min-value-wrong-for-limit': 'error',
429-
'n8n-nodes-base/node-param-placeholder-miscased-id': 'error',
430-
'n8n-nodes-base/node-param-description-miscased-url': 'error',
431-
'n8n-nodes-base/node-param-option-name-wrong-for-upsert': 'error',
432-
'n8n-nodes-base/node-param-options-type-unsorted-items': 'error',
433-
'n8n-nodes-base/node-param-default-wrong-for-string': 'error',
434-
'n8n-nodes-base/node-param-default-wrong-for-number': 'error',
435-
'n8n-nodes-base/node-param-description-lowercase-first-char': 'error',
436-
'n8n-nodes-base/node-param-display-name-miscased': 'error',
437-
'n8n-nodes-base/node-param-default-wrong-for-fixed-collection': 'error',
438-
'n8n-nodes-base/node-param-description-line-break-html-tag': 'error',
451+
'n8n-nodes-base/node-class-description-inputs-wrong-regular-node': 'error',
439452
},
440453
},
441454
],

packages/nodes-base/credentials/AgileCrmApi.credentials.ts

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ export class AgileCrmApi implements ICredentialType {
1212
displayName: 'Email',
1313
name: 'email',
1414
type: 'string',
15+
placeholder: 'name@email.com',
1516
default: '',
1617
},
1718
{

packages/nodes-base/credentials/Aws.credentials.ts

+1
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@ export class Aws implements ICredentialType {
152152
{
153153
displayName: 'Temporary Security Credentials',
154154
name: 'temporaryCredentials',
155+
// eslint-disable-next-line n8n-nodes-base/node-param-description-boolean-without-whether
155156
description: 'Support for temporary credentials from AWS STS',
156157
type: 'boolean',
157158
default: false,

packages/nodes-base/credentials/CopperApi.credentials.ts

+1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ export class CopperApi implements ICredentialType {
2020
name: 'email',
2121
required: true,
2222
type: 'string',
23+
placeholder: 'name@email.com',
2324
default: '',
2425
},
2526
];

packages/nodes-base/credentials/FormIoApi.credentials.ts

+1
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ export class FormIoApi implements ICredentialType {
4242
displayName: 'Email',
4343
name: 'email',
4444
type: 'string',
45+
placeholder: 'name@email.com',
4546
default: '',
4647
},
4748
{

packages/nodes-base/credentials/GoogleApi.credentials.ts

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ export class GoogleApi implements ICredentialType {
1414
displayName: 'Service Account Email',
1515
name: 'email',
1616
type: 'string',
17+
placeholder: 'name@email.com',
1718
default: '',
1819
description: 'The Google Service account similar to user-808@project.iam.gserviceaccount.com',
1920
required: true,

packages/nodes-base/credentials/HaloPSAApi.credentials.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export class HaloPSAApi implements ICredentialType {
3737
type: 'string',
3838
default: '',
3939
required: true,
40-
description: 'The Resource server is available at your "Halo Web Application url/api"',
40+
description: 'The Resource server is available at your "Halo Web Application URL/api"',
4141
},
4242
{
4343
displayName: 'Client ID',

packages/nodes-base/credentials/HubspotDeveloperApi.credentials.ts

-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ export class HubspotDeveloperApi implements ICredentialType {
6464
type: 'string',
6565
required: true,
6666
default: '',
67-
description: 'The APP ID',
6867
},
6968
{
7069
displayName: 'Scope',

packages/nodes-base/credentials/JiraSoftwareCloudApi.credentials.ts

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ export class JiraSoftwareCloudApi implements ICredentialType {
1212
displayName: 'Email',
1313
name: 'email',
1414
type: 'string',
15+
placeholder: 'name@email.com',
1516
default: '',
1617
},
1718
{

packages/nodes-base/credentials/JiraSoftwareServerApi.credentials.ts

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ export class JiraSoftwareServerApi implements ICredentialType {
1212
displayName: 'Email',
1313
name: 'email',
1414
type: 'string',
15+
placeholder: 'name@email.com',
1516
default: '',
1617
},
1718
{

packages/nodes-base/credentials/Kafka.credentials.ts

-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,6 @@ export class Kafka implements ICredentialType {
9191
},
9292
],
9393
default: 'plain',
94-
description: 'The SASL mechanism',
9594
},
9695
];
9796
}

packages/nodes-base/credentials/MicrosoftDynamicsOAuth2Api.credentials.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ export class MicrosoftDynamicsOAuth2Api implements ICredentialType {
9393
value: 'crm15.dynamics.com',
9494
},
9595
{
96-
name: 'United Kingdom (UK/ GBR)',
96+
name: 'United Kingdom (UK/ GBR)',
9797
value: 'crm11.dynamics.com',
9898
},
9999
{

packages/nodes-base/credentials/MispApi.credentials.ts

+1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ export class MispApi implements ICredentialType {
2424
displayName: 'Allow Unauthorized Certificates',
2525
name: 'allowUnauthorizedCerts',
2626
type: 'boolean',
27+
description: 'Whether to connect even if SSL certificate validation is not possible',
2728
default: false,
2829
},
2930
];

packages/nodes-base/credentials/MongoDb.credentials.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,7 @@ export class MongoDb implements ICredentialType {
3636
},
3737
default: '',
3838
placeholder: 'mongodb://<USERNAME>:<PASSWORD>@localhost:27017/?authSource=admin&readPreference=primary&appname=n8n&ssl=false',
39-
description: `If provided, the value here will be used as a MongoDB connection string,
40-
and the MongoDB credentials will be ignored`,
39+
description: 'If provided, the value here will be used as a MongoDB connection string, and the MongoDB credentials will be ignored',
4140
},
4241
{
4342
displayName: 'Host',

packages/nodes-base/credentials/SplunkApi.credentials.ts

+1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ export class SplunkApi implements ICredentialType {
2626
displayName: 'Allow Self-Signed Certificates',
2727
name: 'allowUnauthorizedCerts',
2828
type: 'boolean',
29+
description: 'Whether to connect even if SSL certificate validation is not possible',
2930
default: false,
3031
},
3132
];

packages/nodes-base/credentials/StrapiApi.credentials.ts

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ export class StrapiApi implements ICredentialType {
1212
displayName: 'Email',
1313
name: 'email',
1414
type: 'string',
15+
placeholder: 'name@email.com',
1516
default: '',
1617
},
1718
{

packages/nodes-base/credentials/TheHiveApi.credentials.ts

+1
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ export class TheHiveApi implements ICredentialType {
4545
displayName: 'Ignore SSL Issues',
4646
name: 'allowUnauthorizedCerts',
4747
type: 'boolean',
48+
description: 'Whether to connect even if SSL certificate validation is not possible',
4849
default: false,
4950
},
5051
];

packages/nodes-base/credentials/UProcApi.credentials.ts

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ export class UProcApi implements ICredentialType {
1212
displayName: 'Email',
1313
name: 'email',
1414
type: 'string',
15+
placeholder: 'name@email.com',
1516
default: '',
1617
},
1718
{

packages/nodes-base/credentials/ZammadBasicAuthApi.credentials.ts

+1
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ export class ZammadBasicAuthApi implements ICredentialType {
3838
displayName: 'Ignore SSL Issues',
3939
name: 'allowUnauthorizedCerts',
4040
type: 'boolean',
41+
description: 'Whether to connect even if SSL certificate validation is not possible',
4142
default: false,
4243
},
4344
];

packages/nodes-base/credentials/ZammadTokenAuthApi.credentials.ts

+1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ export class ZammadTokenAuthApi implements ICredentialType {
3030
displayName: 'Ignore SSL Issues',
3131
name: 'allowUnauthorizedCerts',
3232
type: 'boolean',
33+
description: 'Whether to connect even if SSL certificate validation is not possible',
3334
default: false,
3435
},
3536
];

packages/nodes-base/credentials/ZendeskApi.credentials.ts

+1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ export class ZendeskApi implements ICredentialType {
2323
displayName: 'Email',
2424
name: 'email',
2525
type: 'string',
26+
placeholder: 'name@email.com',
2627
default: '',
2728
},
2829
{

packages/nodes-base/credentials/ZulipApi.credentials.ts

+1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ export class ZulipApi implements ICredentialType {
1919
displayName: 'Email',
2020
name: 'email',
2121
type: 'string',
22+
placeholder: 'name@email.com',
2223
default: '',
2324
},
2425
{

packages/nodes-base/nodes/ActiveCampaign/ActiveCampaign.node.ts

+1
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ export class ActiveCampaign implements INodeType {
109109
description: INodeTypeDescription = {
110110
displayName: 'ActiveCampaign',
111111
name: 'activeCampaign',
112+
// eslint-disable-next-line n8n-nodes-base/node-class-description-icon-not-svg
112113
icon: 'file:activeCampaign.png',
113114
group: ['transform'],
114115
version: 1,

packages/nodes-base/nodes/ActiveCampaign/ActiveCampaignTrigger.node.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ export class ActiveCampaignTrigger implements INodeType {
2121
description: INodeTypeDescription = {
2222
displayName: 'ActiveCampaign Trigger',
2323
name: 'activeCampaignTrigger',
24+
// eslint-disable-next-line n8n-nodes-base/node-class-description-icon-not-svg
2425
icon: 'file:activeCampaign.png',
2526
group: ['trigger'],
2627
version: 1,
@@ -46,7 +47,7 @@ export class ActiveCampaignTrigger implements INodeType {
4647
],
4748
properties: [
4849
{
49-
displayName: 'Events',
50+
displayName: 'Event Names or IDs',
5051
name: 'events',
5152
type: 'multiOptions',
5253
typeOptions: {

packages/nodes-base/nodes/ActiveCampaign/ContactDescription.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ export const contactFields: INodeProperties[] = [
5858
displayName: 'Email',
5959
name: 'email',
6060
type: 'string',
61+
placeholder: 'name@email.com',
6162
default: '',
6263
required: true,
6364
displayOptions: {
@@ -87,7 +88,7 @@ export const contactFields: INodeProperties[] = [
8788
},
8889
},
8990
default: false,
90-
description: 'Update user if it exists already. If not set and user exists it will error instead.',
91+
description: 'Whether to update user if it exists already. If not set and user exists it will error instead.',
9192
},
9293
{
9394
displayName: 'Additional Fields',
@@ -245,6 +246,7 @@ export const contactFields: INodeProperties[] = [
245246
displayName: 'Email',
246247
name: 'email',
247248
type: 'string',
249+
placeholder: 'name@email.com',
248250
default: '',
249251
description: 'Email of the contact',
250252
},
@@ -348,6 +350,7 @@ export const contactFields: INodeProperties[] = [
348350
displayName: 'Email',
349351
name: 'email',
350352
type: 'string',
353+
placeholder: 'name@email.com',
351354
default: '',
352355
description: 'Email address of the contact you want to get',
353356
},

packages/nodes-base/nodes/ActiveCampaign/ContactTagDescription.ts

+1
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ export const contactTagFields: INodeProperties[] = [
3939
displayName: 'Tag Name or ID',
4040
name: 'tagId',
4141
type: 'options',
42+
description: 'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/nodes/expressions.html#expressions">expression</a>',
4243
typeOptions: {
4344
loadOptionsMethod: 'getTags',
4445
},

packages/nodes-base/nodes/ActiveCampaign/EcomCustomerDescription.ts

+4-2
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ export const ecomCustomerFields: INodeProperties[] = [
9494
displayName: 'Customer Email',
9595
name: 'email',
9696
type: 'string',
97+
placeholder: 'name@email.com',
9798
default: '',
9899
required: true,
99100
displayOptions: {
@@ -130,7 +131,7 @@ export const ecomCustomerFields: INodeProperties[] = [
130131
name: 'acceptsMarketing',
131132
type: 'boolean',
132133
default: false,
133-
description: 'Indication of whether customer has opt-ed in to marketing communications',
134+
description: 'Whether customer has opt-ed in to marketing communications',
134135
},
135136
],
136137
},
@@ -192,6 +193,7 @@ export const ecomCustomerFields: INodeProperties[] = [
192193
displayName: 'Customer Email',
193194
name: 'email',
194195
type: 'string',
196+
placeholder: 'name@email.com',
195197
default: '',
196198
description: 'The email address of the customer',
197199
},
@@ -200,7 +202,7 @@ export const ecomCustomerFields: INodeProperties[] = [
200202
name: 'acceptsMarketing',
201203
type: 'boolean',
202204
default: false,
203-
description: 'Indication of whether customer has opt-ed in to marketing communications',
205+
description: 'Whether customer has opt-ed in to marketing communications',
204206
},
205207
],
206208
},

packages/nodes-base/nodes/ActiveCampaign/EcomOrderDescription.ts

+2
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ export const ecomOrderFields: INodeProperties[] = [
114114
displayName: 'Customer Email',
115115
name: 'email',
116116
type: 'string',
117+
placeholder: 'name@email.com',
117118
default: '',
118119
required: true,
119120
displayOptions: {
@@ -457,6 +458,7 @@ export const ecomOrderFields: INodeProperties[] = [
457458
displayName: 'Customer Email',
458459
name: 'email',
459460
type: 'string',
461+
placeholder: 'name@email.com',
460462
default: '',
461463
description: 'The email address of the customer who placed the order',
462464
},

0 commit comments

Comments
 (0)