refactor: Apply more eslint-plugin-n8n-nodes-base autofixable rules (#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 <ivov.src@gmail.com>

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

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

Co-authored-by: Iván Ovejero <ivov.src@gmail.com>

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

* 🔨 fix

*  Fix `Assigned To` fields

Co-authored-by: Michael Kret <michael.k@radency.com>

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

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

Co-authored-by: Iván Ovejero <ivov.src@gmail.com>

* 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 <ivov.src@gmail.com>

* 👕 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 <ivov.src@gmail.com>

* 👕 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 <michael.k@radency.com>
Co-authored-by: Iván Ovejero <ivov.src@gmail.com>

*  Restore `lintfix` command

Co-authored-by: Omar Ajoue <krynble@gmail.com>
Co-authored-by: Michael Kret <88898367+michael-radency@users.noreply.github.com>
Co-authored-by: agobrech <45268029+agobrech@users.noreply.github.com>
Co-authored-by: Michael Kret <michael.k@radency.com>
Co-authored-by: brianinoa <54530642+brianinoa@users.noreply.github.com>
This commit is contained in:
Iván Ovejero
2022-06-03 19:23:49 +02:00
committed by GitHub
parent 58ecadf53c
commit 70ae90fa3c
501 changed files with 4668 additions and 4555 deletions

View File

@@ -67,6 +67,7 @@ export const opportunityFields: INodeProperties[] = [
/* opportunity:create */
/* -------------------------------------------------------------------------- */
{
// eslint-disable-next-line n8n-nodes-base/node-param-display-name-wrong-for-dynamic-options
displayName: 'Match Against',
name: 'externalId',
type: 'options',
@@ -88,7 +89,7 @@ export const opportunityFields: INodeProperties[] = [
],
},
},
description: 'The field to check to see if the opportunity already exists',
description: 'The field to check to see if the opportunity already exists. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/nodes/expressions.html#expressions">expression</a>.',
},
{
displayName: 'Value to Match',
@@ -147,7 +148,7 @@ export const opportunityFields: INodeProperties[] = [
description: 'Required. Date when the opportunity is expected to close.',
},
{
displayName: 'Stage Name',
displayName: 'Stage Name or ID',
name: 'stageName',
type: 'options',
typeOptions: {
@@ -166,7 +167,7 @@ export const opportunityFields: INodeProperties[] = [
],
},
},
description: 'Required. Date when the opportunity is expected to close.',
description: 'Required. Date when the opportunity is expected to close. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/nodes/expressions.html#expressions">expression</a>.',
},
{
displayName: 'Additional Fields',
@@ -187,14 +188,14 @@ export const opportunityFields: INodeProperties[] = [
},
options: [
{
displayName: 'Account',
displayName: 'Account Name or ID',
name: 'accountId',
type: 'options',
default: '',
typeOptions: {
loadOptionsMethod: 'getAccounts',
},
description: 'ID of the account associated with this opportunity',
description: 'ID of the account associated with this opportunity. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/nodes/expressions.html#expressions">expression</a>.',
},
{
displayName: 'Amount',
@@ -207,14 +208,14 @@ export const opportunityFields: INodeProperties[] = [
description: 'Estimated total sale amount',
},
{
displayName: 'Campaign',
displayName: 'Campaign Name or ID',
name: 'campaignId',
type: 'options',
typeOptions: {
loadOptionsMethod: 'getCampaigns',
},
default: '',
description: 'ID of the campaign that needs to be fetched',
description: 'ID of the campaign that needs to be fetched. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/nodes/expressions.html#expressions">expression</a>.',
},
{
displayName: 'Custom Fields',
@@ -232,14 +233,14 @@ export const opportunityFields: INodeProperties[] = [
displayName: 'Custom Field',
values: [
{
displayName: 'Field ID',
displayName: 'Field Name or ID',
name: 'fieldId',
type: 'options',
typeOptions: {
loadOptionsMethod: 'getCustomFields',
},
default: '',
description: 'The ID of the field to add custom field to',
description: 'The ID of the field to add custom field to. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/nodes/expressions.html#expressions">expression</a>.',
},
{
displayName: 'Value',
@@ -267,14 +268,14 @@ export const opportunityFields: INodeProperties[] = [
description: 'It is implied, but not directly controlled, by the StageName field',
},
{
displayName: 'Lead Source',
displayName: 'Lead Source Name or ID',
name: 'leadSource',
type: 'options',
typeOptions: {
loadOptionsMethod: 'getLeadSources',
},
default: '',
description: 'Source from which the lead was obtained',
description: 'Source from which the lead was obtained. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/nodes/expressions.html#expressions">expression</a>.',
},
{
displayName: 'Next Step',
@@ -284,14 +285,14 @@ export const opportunityFields: INodeProperties[] = [
description: 'Description of next task in closing opportunity. Limit: 255 characters.',
},
{
displayName: 'Owner',
displayName: 'Owner Name or ID',
name: 'owner',
type: 'options',
typeOptions: {
loadOptionsMethod: 'getUsers',
},
default: '',
description: 'The owner of the opportunity',
description: 'The owner of the opportunity. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/nodes/expressions.html#expressions">expression</a>.',
},
{
displayName: 'Phone',
@@ -376,14 +377,14 @@ export const opportunityFields: INodeProperties[] = [
},
options: [
{
displayName: 'Account',
displayName: 'Account Name or ID',
name: 'accountId',
type: 'options',
default: '',
typeOptions: {
loadOptionsMethod: 'getAccounts',
},
description: 'ID of the account associated with this opportunity',
description: 'ID of the account associated with this opportunity. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/nodes/expressions.html#expressions">expression</a>.',
},
{
displayName: 'Amount',
@@ -396,14 +397,14 @@ export const opportunityFields: INodeProperties[] = [
description: 'Estimated total sale amount',
},
{
displayName: 'Campaign',
displayName: 'Campaign Name or ID',
name: 'campaignId',
type: 'options',
typeOptions: {
loadOptionsMethod: 'getCampaigns',
},
default: '',
description: 'ID of the campaign that needs to be fetched',
description: 'ID of the campaign that needs to be fetched. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/nodes/expressions.html#expressions">expression</a>.',
},
{
displayName: 'Close Date',
@@ -428,14 +429,14 @@ export const opportunityFields: INodeProperties[] = [
displayName: 'Custom Field',
values: [
{
displayName: 'Field ID',
displayName: 'Field Name or ID',
name: 'fieldId',
type: 'options',
typeOptions: {
loadOptionsMethod: 'getCustomFields',
},
default: '',
description: 'The ID of the field to add custom field to',
description: 'The ID of the field to add custom field to. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/nodes/expressions.html#expressions">expression</a>.',
},
{
displayName: 'Value',
@@ -463,14 +464,14 @@ export const opportunityFields: INodeProperties[] = [
description: 'It is implied, but not directly controlled, by the StageName field',
},
{
displayName: 'Lead Source',
displayName: 'Lead Source Name or ID',
name: 'leadSource',
type: 'options',
typeOptions: {
loadOptionsMethod: 'getLeadSources',
},
default: '',
description: 'Source from which the lead was obtained',
description: 'Source from which the lead was obtained. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/nodes/expressions.html#expressions">expression</a>.',
},
{
displayName: 'Name',
@@ -487,14 +488,14 @@ export const opportunityFields: INodeProperties[] = [
description: 'Description of next task in closing opportunity. Limit: 255 characters.',
},
{
displayName: 'Owner',
displayName: 'Owner Name or ID',
name: 'owner',
type: 'options',
typeOptions: {
loadOptionsMethod: 'getUsers',
},
default: '',
description: 'The owner of the opportunity',
description: 'The owner of the opportunity. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/nodes/expressions.html#expressions">expression</a>.',
},
{
displayName: 'Phone',
@@ -521,14 +522,14 @@ export const opportunityFields: INodeProperties[] = [
description: 'Percentage of estimated confidence in closing the opportunity',
},
{
displayName: 'Stage Name',
displayName: 'Stage Name or ID',
name: 'stageName',
type: 'options',
typeOptions: {
loadOptionsMethod: 'getStages',
},
default: '',
description: 'Required. Date when the opportunity is expected to close.',
description: 'Required. Date when the opportunity is expected to close. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/nodes/expressions.html#expressions">expression</a>.',
},
{
displayName: 'Type',
@@ -671,14 +672,14 @@ export const opportunityFields: INodeProperties[] = [
displayName: 'Condition',
values: [
{
displayName: 'Field',
displayName: 'Field Name or ID',
name: 'field',
type: 'options',
typeOptions: {
loadOptionsMethod: 'getOpportunityFields',
},
default: '',
description: 'For date, number, or boolean, please use expressions',
description: 'For date, number, or boolean, please use expressions. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/nodes/expressions.html#expressions">expression</a>.',
},
// eslint-disable-next-line n8n-nodes-base/node-param-operation-without-no-data-expression
{
@@ -686,6 +687,14 @@ export const opportunityFields: INodeProperties[] = [
name: 'operation',
type: 'options',
options: [
{
name: '<',
value: '<',
},
{
name: '<=',
value: '<=',
},
{
name: '=',
value: 'equal',
@@ -694,18 +703,10 @@ export const opportunityFields: INodeProperties[] = [
name: '>',
value: '>',
},
{
name: '<',
value: '<',
},
{
name: '>=',
value: '>=',
},
{
name: '<=',
value: '<=',
},
],
default: 'equal',
},
@@ -803,14 +804,14 @@ export const opportunityFields: INodeProperties[] = [
description: 'Whether true, only the note owner or a user with the “Modify All Data” permission can view the note or query it via the API',
},
{
displayName: 'Owner',
displayName: 'Owner Name or ID',
name: 'owner',
type: 'options',
typeOptions: {
loadOptionsMethod: 'getUsers',
},
default: '',
description: 'ID of the user who owns the note',
description: 'ID of the user who owns the note. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/nodes/expressions.html#expressions">expression</a>.',
},
],
},