Skip to content

Commit

Permalink
refactor: Apply more eslint-plugin-n8n-nodes-base autofixable rules (
Browse files Browse the repository at this point in the history
…#3432)

* ⚡ Update `lintfix` script

* 👕 Remove unneeded lint exceptions

* 👕 Run baseline `lintfix`

* 👕 Apply `node-param-description-miscased-url` (#3441)

* 👕 Apply `rule node-param-placeholder-miscased-id` (#3443)

Co-authored-by: Iván Ovejero <[email protected]>

* 👕 Apply `node-param-option-name-wrong-for-upsert` (#3446)

* 👕 Apply `node-param-min-value-wrong-for-limit` (#3442)

Co-authored-by: Iván Ovejero <[email protected]>

* Apply `node-param-display-name-wrong-for-dynamic-options` (#3454)

* 🔨 fix

* ⚡ Fix `Assigned To` fields

Co-authored-by: Michael Kret <[email protected]>

* 👕 Apply `rule node-param-default-wrong-for-number` (#3453)

* 👕 Apply `node-param-default-wrong-for-string` (#3452)

Co-authored-by: Iván Ovejero <[email protected]>

* Apply `node-param-display-name-miscased` (#3449)

* 🔨 fix

* 🔨 exceptions

* ⚡ review fixes

* 👕 Apply `node-param-description-lowercase-first-char` (#3451)

* ⚡ fix

* ⚡ review fixes

* ⚡ fix

Co-authored-by: Iván Ovejero <[email protected]>

* 👕 Apply `node-param-description-wrong-for-dynamic-options` (#3456)

* Rule working as intended

* Add rule

* 🔥 Remove repetitions

* 👕 Add exceptions

Co-authored-by: Iván Ovejero <[email protected]>

* 👕 Small fix for `node-param-description-wrong-for-dynamic-options`

* 👕 Apply `node-param-default-wrong-for-fixed-collection` (#3460)

* 👕 Apply `node-param-description-line-break-html-tag` (#3462)

* 👕 Run baseline `lintfix`

* 👕 Apply `node-param-options-type-unsorted-items` (#3459)

* ⚡ fix

* 🔨 exceptions

* Add exception for Salesmate and Zoom

Co-authored-by: Michael Kret <[email protected]>
Co-authored-by: Iván Ovejero <[email protected]>

* ⚡ Restore `lintfix` command

Co-authored-by: Omar Ajoue <[email protected]>
Co-authored-by: Michael Kret <[email protected]>
Co-authored-by: agobrech <[email protected]>
Co-authored-by: Michael Kret <[email protected]>
Co-authored-by: brianinoa <[email protected]>
  • Loading branch information
6 people authored Jun 3, 2022
1 parent 58ecadf commit 70ae90f
Show file tree
Hide file tree
Showing 501 changed files with 4,511 additions and 4,398 deletions.
13 changes: 13 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -423,6 +423,19 @@ 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-description-wrong-for-dynamic-options': 'error',
'n8n-nodes-base/node-param-display-name-wrong-for-dynamic-options': 'error',
'n8n-nodes-base/node-param-min-value-wrong-for-limit': 'error',
'n8n-nodes-base/node-param-placeholder-miscased-id': 'error',
'n8n-nodes-base/node-param-description-miscased-url': 'error',
'n8n-nodes-base/node-param-option-name-wrong-for-upsert': 'error',
'n8n-nodes-base/node-param-options-type-unsorted-items': 'error',
'n8n-nodes-base/node-param-default-wrong-for-string': 'error',
'n8n-nodes-base/node-param-default-wrong-for-number': 'error',
'n8n-nodes-base/node-param-description-lowercase-first-char': 'error',
'n8n-nodes-base/node-param-display-name-miscased': 'error',
'n8n-nodes-base/node-param-default-wrong-for-fixed-collection': 'error',
'n8n-nodes-base/node-param-description-line-break-html-tag': 'error',
},
},
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ export const personTagFields: INodeProperties[] = [
// personTag: add
// ----------------------------------------
{
displayName: 'Tag ID',
displayName: 'Tag Name or ID',
name: 'tagId',
description: 'ID of the tag to add',
description: 'ID of the tag to add. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/nodes/expressions.html#expressions">expression</a>.',
type: 'options',
typeOptions: {
loadOptionsMethod: 'getTags',
Expand Down Expand Up @@ -77,9 +77,9 @@ export const personTagFields: INodeProperties[] = [
// personTag: remove
// ----------------------------------------
{
displayName: 'Tag ID',
displayName: 'Tag Name or ID',
name: 'tagId',
description: 'ID of the tag whose tagging to delete',
description: 'ID of the tag whose tagging to delete. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/nodes/expressions.html#expressions">expression</a>.',
type: 'options',
typeOptions: {
loadOptionsMethod: 'getTags',
Expand All @@ -98,9 +98,9 @@ export const personTagFields: INodeProperties[] = [
},
},
{
displayName: 'Tagging ID',
displayName: 'Tagging Name or ID',
name: 'taggingId',
description: 'ID of the tagging to remove',
description: 'ID of the tagging to remove. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/nodes/expressions.html#expressions">expression</a>.',
type: 'options',
typeOptions: {
loadOptionsDependsOn: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ export const accountContactFields: INodeProperties[] = [
default: {},
options: [
{
displayName: 'Job title',
displayName: 'Job Title',
name: 'jobTitle',
type: 'string',
default: '',
Expand Down Expand Up @@ -162,7 +162,7 @@ export const accountContactFields: INodeProperties[] = [
default: {},
options: [
{
displayName: 'Job title',
displayName: 'Job Title',
name: 'jobTitle',
type: 'string',
default: '',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,14 +112,14 @@ export const accountFields: INodeProperties[] = [
displayName: 'Field',
values: [
{
displayName: 'Field ID',
displayName: 'Field Name or ID',
name: 'customFieldId',
type: 'options',
typeOptions: {
loadOptionsMethod: 'getAccountCustomFields',
},
default: '',
description: 'ID of the field to set',
description: 'ID of the field to set. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/nodes/expressions.html#expressions">expression</a>.',
},
{
displayName: 'Field Value',
Expand Down Expand Up @@ -204,14 +204,14 @@ export const accountFields: INodeProperties[] = [
displayName: 'Field',
values: [
{
displayName: 'Field ID',
displayName: 'Field Name or ID',
name: 'customFieldId',
type: 'options',
typeOptions: {
loadOptionsMethod: 'getAccountCustomFields',
},
default: '',
description: 'ID of the field to set',
description: 'ID of the field to set. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/nodes/expressions.html#expressions">expression</a>.',
},
{
displayName: 'Field Value',
Expand Down
18 changes: 9 additions & 9 deletions packages/nodes-base/nodes/ActiveCampaign/ActiveCampaign.node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,10 @@ export class ActiveCampaign implements INodeType {
name: 'Account Contact',
value: 'accountContact',
},
{
name: 'Connection',
value: 'connection',
},
{
name: 'Contact',
value: 'contact',
Expand All @@ -155,24 +159,20 @@ export class ActiveCampaign implements INodeType {
name: 'Contact Tag',
value: 'contactTag',
},
{
name: 'Connection',
value: 'connection',
},
{
name: 'Deal',
value: 'deal',
},
{
name: 'E-commerce Order',
value: 'ecommerceOrder',
},
{
name: 'E-Commerce Customer',
value: 'ecommerceCustomer',
},
{
name: 'E-commerce Order Product',
name: 'E-Commerce Order',
value: 'ecommerceOrder',
},
{
name: 'E-Commerce Order Product',
value: 'ecommerceOrderProducts',
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export const connectionFields: INodeProperties[] = [
description: 'The name of the service',
},
{
displayName: 'External accout ID',
displayName: 'External Account ID',
name: 'externalid',
type: 'string',
default: '',
Expand Down Expand Up @@ -193,7 +193,7 @@ export const connectionFields: INodeProperties[] = [
description: 'The name of the service',
},
{
displayName: 'External accout ID',
displayName: 'External Account ID',
name: 'externalid',
type: 'string',
default: '',
Expand Down
26 changes: 13 additions & 13 deletions packages/nodes-base/nodes/ActiveCampaign/ContactDescription.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export const contactFields: INodeProperties[] = [
description: 'The email of the contact to create',
},
{
displayName: 'Update if exists',
displayName: 'Update if Exists',
name: 'updateIfExists',
type: 'boolean',
displayOptions: {
Expand Down Expand Up @@ -122,14 +122,14 @@ export const contactFields: INodeProperties[] = [
displayName: 'Custom Field',
values: [
{
displayName: 'Field ID',
displayName: 'Field Name or ID',
name: 'field',
type: 'options',
typeOptions: {
loadOptionsMethod: 'getContactCustomFields',
},
default: '',
description: 'ID of the field to set',
description: 'ID of the field to set. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/nodes/expressions.html#expressions">expression</a>.',
},
{
displayName: 'Field Value',
Expand Down Expand Up @@ -221,14 +221,14 @@ export const contactFields: INodeProperties[] = [
displayName: 'Custom Field',
values: [
{
displayName: 'Field ID',
displayName: 'Field Name or ID',
name: 'field',
type: 'options',
typeOptions: {
loadOptionsMethod: 'getContactCustomFields',
},
default: '',
description: 'ID of the field to set',
description: 'ID of the field to set. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/nodes/expressions.html#expressions">expression</a>.',
},
{
displayName: 'Field Value',
Expand Down Expand Up @@ -405,26 +405,26 @@ export const contactFields: INodeProperties[] = [
name: 'status',
type: 'options',
options: [
{
name: 'Active',
value: 1,
},
{
name: 'Any',
value: -1,
},
{
name: 'Unconfirmed',
value: 0,
name: 'Bounced',
value: 3,
},
{
name: 'Active',
value: 1,
name: 'Unconfirmed',
value: 0,
},
{
name: 'Unsubscribed',
value: 2,
},
{
name: 'Bounced',
value: 3,
},
],
default: '',
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export const contactTagFields: INodeProperties[] = [
// contactTag:add
// ----------------------------------
{
displayName: 'Tag ID',
displayName: 'Tag Name or ID',
name: 'tagId',
type: 'options',
typeOptions: {
Expand Down
Loading

0 comments on commit 70ae90f

Please sign in to comment.