refactor: Clear unused ESLint directives from nodes-base (no-changelog) (#6812)

* refactor: Clear unused ESLint directives from nodes-base (no-changelog)

* removed unused disable directives

---------

Co-authored-by: Marcus <marcus@n8n.io>
This commit is contained in:
Iván Ovejero 2023-08-01 15:32:33 +02:00 committed by GitHub
parent 52aafe0737
commit 24ce141815
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
85 changed files with 44 additions and 110 deletions

View file

@ -165,7 +165,6 @@ export class Aws implements ICredentialType {
{ {
displayName: 'Temporary Security Credentials', displayName: 'Temporary Security Credentials',
name: 'temporaryCredentials', name: 'temporaryCredentials',
// eslint-disable-next-line n8n-nodes-base/node-param-description-boolean-without-whether
description: 'Support for temporary credentials from AWS STS', description: 'Support for temporary credentials from AWS STS',
type: 'boolean', type: 'boolean',
default: false, default: false,

View file

@ -190,7 +190,6 @@ export class AgileCrm implements INodeType {
} }
if (simple) { if (simple) {
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
responseData = simplifyResponse(responseData); responseData = simplifyResponse(responseData);
} }
} else if (operation === 'create') { } else if (operation === 'create') {

View file

@ -1,4 +1,3 @@
/* eslint-disable n8n-nodes-base/node-filename-against-convention */
import type { import type {
IExecuteFunctions, IExecuteFunctions,
INodeType, INodeType,

View file

@ -24,7 +24,6 @@ export const description: INodeProperties[] = [
action: 'Create a record', action: 'Create a record',
}, },
{ {
// eslint-disable-next-line n8n-nodes-base/node-param-option-name-wrong-for-upsert
name: 'Create or Update', name: 'Create or Update',
value: 'upsert', value: 'upsert',
description: 'Create a new record, or update the current one if it already exists (upsert)', description: 'Create a new record, or update the current one if it already exists (upsert)',

View file

@ -283,7 +283,7 @@ export class AwsS3V2 implements INodeType {
this.helpers.returnJsonArray(responseData as IDataObject[]), this.helpers.returnJsonArray(responseData as IDataObject[]),
{ itemData: { item: i } }, { itemData: { item: i } },
); );
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
returnData.push(...executionData); returnData.push(...executionData);
} }
} }

View file

@ -1,4 +1,3 @@
/* eslint-disable @typescript-eslint/no-unsafe-argument */
import type { IExecuteFunctions, INodeExecutionData } from 'n8n-workflow'; import type { IExecuteFunctions, INodeExecutionData } from 'n8n-workflow';
import * as employee from './employee'; import * as employee from './employee';

View file

@ -97,7 +97,6 @@ export const taskFields: INodeProperties[] = [
default: {}, default: {},
options: [ options: [
{ {
// eslint-disable-next-line n8n-nodes-base/node-param-display-name-wrong-for-dynamic-multi-options
displayName: 'Assignee Names or IDs', displayName: 'Assignee Names or IDs',
name: 'assigneeIds', name: 'assigneeIds',
type: 'multiOptions', type: 'multiOptions',
@ -277,7 +276,6 @@ export const taskFields: INodeProperties[] = [
default: {}, default: {},
options: [ options: [
{ {
// eslint-disable-next-line n8n-nodes-base/node-param-display-name-wrong-for-dynamic-multi-options
displayName: 'Assignee Names or IDs', displayName: 'Assignee Names or IDs',
name: 'assigneeIds', name: 'assigneeIds',
type: 'multiOptions', type: 'multiOptions',

View file

@ -140,7 +140,6 @@ export const timeEntryFields: INodeProperties[] = [
default: '', default: '',
}, },
{ {
// eslint-disable-next-line n8n-nodes-base/node-param-display-name-wrong-for-dynamic-multi-options
displayName: 'Tag Names or IDs', displayName: 'Tag Names or IDs',
name: 'tagIds', name: 'tagIds',
type: 'multiOptions', type: 'multiOptions',
@ -328,7 +327,6 @@ export const timeEntryFields: INodeProperties[] = [
default: '', default: '',
}, },
{ {
// eslint-disable-next-line n8n-nodes-base/node-param-display-name-wrong-for-dynamic-multi-options
displayName: 'Tag Names or IDs', displayName: 'Tag Names or IDs',
name: 'tagIds', name: 'tagIds',
type: 'multiOptions', type: 'multiOptions',

View file

@ -411,7 +411,6 @@ export class Coda implements INodeType {
return [this.helpers.returnJsonArray(responseData as IDataObject[])]; return [this.helpers.returnJsonArray(responseData as IDataObject[])];
} else { } else {
for (const item of responseData) { for (const item of responseData) {
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
returnData.push({ returnData.push({
id: item.id, id: item.id,
...item.values, ...item.values,
@ -758,7 +757,6 @@ export class Coda implements INodeType {
return [this.helpers.returnJsonArray(responseData as IDataObject[])]; return [this.helpers.returnJsonArray(responseData as IDataObject[])];
} else { } else {
for (const item of responseData) { for (const item of responseData) {
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
returnData.push({ returnData.push({
id: item.id, id: item.id,
...item.values, ...item.values,

View file

@ -66,7 +66,6 @@ export class JavaScriptSandbox extends Sandbox {
error.message = (quoted as string) + '. Did you mean `$input.all()`?'; error.message = (quoted as string) + '. Did you mean `$input.all()`?';
} }
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
throw new ExecutionError(error); throw new ExecutionError(error);
} }
@ -111,7 +110,6 @@ export class JavaScriptSandbox extends Sandbox {
error.message = (quoted as string) + '. Did you mean `$input.item.json`?'; error.message = (quoted as string) + '. Did you mean `$input.item.json`?';
} }
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
throw new ExecutionError(error, this.itemIndex); throw new ExecutionError(error, this.itemIndex);
} }

View file

@ -301,7 +301,7 @@ export const coinFields: INodeProperties[] = [
name: 'days', name: 'days',
required: true, required: true,
type: 'options', type: 'options',
// eslint-disable-next-line n8n-nodes-base/node-param-options-type-unsorted-items
options: [ options: [
{ {
name: '1', name: '1',

View file

@ -89,7 +89,6 @@ export class ERPNext implements INodeType {
docFields.unshift({ name: '*', value: '*' }); docFields.unshift({ name: '*', value: '*' });
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
return processNames(docFields); return processNames(docFields);
}, },
async getDocFields(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]> { async getDocFields(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]> {
@ -107,7 +106,6 @@ export class ERPNext implements INodeType {
}, },
); );
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
return processNames(docFields); return processNames(docFields);
}, },
}, },

View file

@ -1108,7 +1108,6 @@ export class EditImage implements INodeType {
const operator = operationData.operator as string; const operator = operationData.operator as string;
const geometryString = const geometryString =
// eslint-disable-next-line @typescript-eslint/restrict-plus-operands
(positionX >= 0 ? '+' : '') + positionX + (positionY >= 0 ? '+' : '') + positionY; (positionX >= 0 ? '+' : '') + positionX + (positionY >= 0 ? '+' : '') + positionY;
const binaryPropertyName = operationData.dataPropertyNameComposite as string; const binaryPropertyName = operationData.dataPropertyNameComposite as string;
@ -1284,7 +1283,6 @@ export class EditImage implements INodeType {
const fileName = newItem.binary![dataPropertyName].fileName; const fileName = newItem.binary![dataPropertyName].fileName;
if (fileName?.includes('.')) { if (fileName?.includes('.')) {
newItem.binary![dataPropertyName].fileName = newItem.binary![dataPropertyName].fileName =
// eslint-disable-next-line @typescript-eslint/restrict-plus-operands
fileName.split('.').slice(0, -1).join('.') + '.' + options.format; fileName.split('.').slice(0, -1).join('.') + '.' + options.format;
} }
} }

View file

@ -631,7 +631,6 @@ export class Egoi implements INodeType {
} }
if (simple) { if (simple) {
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
const data = (await simplify.call(this, [responseData], listId))[0]; const data = (await simplify.call(this, [responseData], listId))[0];
responseData = { responseData = {
@ -675,7 +674,6 @@ export class Egoi implements INodeType {
} }
if (simple) { if (simple) {
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
responseData = await simplify.call(this, responseData, listId); responseData = await simplify.call(this, responseData, listId);
} }
} }

View file

@ -20,7 +20,7 @@ export class ExecuteWorkflowTrigger implements INodeType {
name: 'Execute Workflow Trigger', name: 'Execute Workflow Trigger',
color: '#ff6d5a', color: '#ff6d5a',
}, },
// eslint-disable-next-line n8n-nodes-base/node-class-description-inputs-wrong-regular-node
inputs: [], inputs: [],
outputs: ['main'], outputs: ['main'],
properties: [ properties: [

View file

@ -1,4 +1,3 @@
/* eslint-disable n8n-nodes-base/node-class-description-missing-subtitle */
import type { import type {
IDataObject, IDataObject,
IExecuteFunctions, IExecuteFunctions,
@ -37,7 +36,6 @@ export class ExecutionData implements INodeType {
noDataExpression: true, noDataExpression: true,
options: [ options: [
{ {
// eslint-disable-next-line n8n-nodes-base/node-param-display-name-miscased
name: 'Save Execution Data for Search', name: 'Save Execution Data for Search',
value: 'save', value: 'save',
action: 'Save execution data for search', action: 'Save execution data for search',

View file

@ -554,7 +554,6 @@ export function getFields(object: string) {
], ],
} as { [key: string]: any }; } as { [key: string]: any };
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
return [{ name: '*', value: '*' }].concat(data[object] || []).map((fieldObject: IDataObject) => ({ return [{ name: '*', value: '*' }].concat(data[object] || []).map((fieldObject: IDataObject) => ({
...fieldObject, ...fieldObject,
name: fieldObject.value !== '*' ? capitalCase(fieldObject.value as string) : fieldObject.value, name: fieldObject.value !== '*' ? capitalCase(fieldObject.value as string) : fieldObject.value,

View file

@ -15,7 +15,6 @@ import { randomBytes } from 'crypto';
export class FigmaTrigger implements INodeType { export class FigmaTrigger implements INodeType {
description: INodeTypeDescription = { description: INodeTypeDescription = {
// eslint-disable-next-line n8n-nodes-base/node-class-description-display-name-unsuffixed-trigger-node
displayName: 'Figma Trigger (Beta)', displayName: 'Figma Trigger (Beta)',
name: 'figmaTrigger', name: 'figmaTrigger',
icon: 'file:figma.svg', icon: 'file:figma.svg',

View file

@ -236,7 +236,7 @@ export class Freshservice implements INodeType {
fields = fields fields = fields
.concat(...asset_type_fields.map((data) => data.fields)) .concat(...asset_type_fields.map((data) => data.fields))
.map((data) => ({ name: data.label, id: data.name })); .map((data) => ({ name: data.label, id: data.name }));
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
return toOptions(fields); return toOptions(fields);
}, },

View file

@ -222,8 +222,7 @@ export const agentFields: INodeProperties[] = [
}, },
}, },
{ {
// eslint-disable-next-line n8n-nodes-base/node-param-display-name-wrong-for-dynamic-multi-options displayName: 'Group Names or IDs',
displayName: 'Member of Group Names/IDs',
name: 'member_of', name: 'member_of',
type: 'multiOptions', type: 'multiOptions',
default: [], default: [],
@ -240,7 +239,6 @@ export const agentFields: INodeProperties[] = [
default: '', default: '',
}, },
{ {
// eslint-disable-next-line n8n-nodes-base/node-param-display-name-wrong-for-dynamic-multi-options
displayName: 'Observer of Group Names/IDs', displayName: 'Observer of Group Names/IDs',
name: 'observer_of', name: 'observer_of',
type: 'multiOptions', type: 'multiOptions',
@ -257,7 +255,7 @@ export const agentFields: INodeProperties[] = [
type: 'options', type: 'options',
description: 'ID of the level of the agent in the Arcade', description: 'ID of the level of the agent in the Arcade',
default: 1, default: 1,
// eslint-disable-next-line n8n-nodes-base/node-param-options-type-unsorted-items
options: [ options: [
{ {
name: 'Beginner', name: 'Beginner',
@ -558,8 +556,7 @@ export const agentFields: INodeProperties[] = [
}, },
}, },
{ {
// eslint-disable-next-line n8n-nodes-base/node-param-display-name-wrong-for-dynamic-multi-options displayName: 'Group Names or IDs',
displayName: 'Member of Group Names/IDs',
name: 'member_of', name: 'member_of',
type: 'multiOptions', type: 'multiOptions',
default: [], default: [],
@ -576,7 +573,6 @@ export const agentFields: INodeProperties[] = [
default: '', default: '',
}, },
{ {
// eslint-disable-next-line n8n-nodes-base/node-param-display-name-wrong-for-dynamic-multi-options
displayName: 'Observer of Group Names/IDs', displayName: 'Observer of Group Names/IDs',
name: 'observer_of', name: 'observer_of',
type: 'multiOptions', type: 'multiOptions',
@ -593,7 +589,7 @@ export const agentFields: INodeProperties[] = [
type: 'options', type: 'options',
description: 'ID of the level of the agent in the Arcade', description: 'ID of the level of the agent in the Arcade',
default: 1, default: 1,
// eslint-disable-next-line n8n-nodes-base/node-param-options-type-unsorted-items
options: [ options: [
{ {
name: 'Beginner', name: 'Beginner',

View file

@ -259,7 +259,7 @@ export const changeFields: INodeProperties[] = [
name: 'status', name: 'status',
type: 'options', type: 'options',
default: 1, default: 1,
// eslint-disable-next-line n8n-nodes-base/node-param-options-type-unsorted-items
options: [ options: [
{ {
name: 'Open', name: 'Open',
@ -610,7 +610,7 @@ export const changeFields: INodeProperties[] = [
name: 'status', name: 'status',
type: 'options', type: 'options',
default: 1, default: 1,
// eslint-disable-next-line n8n-nodes-base/node-param-options-type-unsorted-items
options: [ options: [
{ {
name: 'Open', name: 'Open',

View file

@ -135,7 +135,7 @@ export const releaseFields: INodeProperties[] = [
operation: ['create'], operation: ['create'],
}, },
}, },
// eslint-disable-next-line n8n-nodes-base/node-param-options-type-unsorted-items
options: [ options: [
{ {
name: 'Open', name: 'Open',
@ -412,7 +412,7 @@ export const releaseFields: INodeProperties[] = [
name: 'status', name: 'status',
type: 'options', type: 'options',
default: 1, default: 1,
// eslint-disable-next-line n8n-nodes-base/node-param-options-type-unsorted-items
options: [ options: [
{ {
name: 'Open', name: 'Open',

View file

@ -216,7 +216,7 @@ export const searchFields: INodeProperties[] = [
value: 'sales_account', value: 'sales_account',
}, },
], ],
// eslint-disable-next-line n8n-nodes-base/node-param-description-unneeded-backticks
description: description:
"Use 'entities' to query against related entities. You can include multiple entities at once, provided the field is available in both entities or else you'd receive an error response.", "Use 'entities' to query against related entities. You can include multiple entities at once, provided the field is available in both entities or else you'd receive an error response.",
}, },

View file

@ -247,7 +247,6 @@ export class GoogleAnalyticsV1 implements INodeType {
if (simple) { if (simple) {
responseData = simplify(responseData); responseData = simplify(responseData);
} else if (returnAll && responseData.length > 1) { } else if (returnAll && responseData.length > 1) {
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
responseData = merge(responseData); responseData = merge(responseData);
} }
} }

View file

@ -1,4 +1,3 @@
/* eslint-disable n8n-nodes-base/node-filename-against-convention */
import type { import type {
IExecuteFunctions, IExecuteFunctions,
INodeExecutionData, INodeExecutionData,

View file

@ -717,7 +717,6 @@ export async function execute(
if (simple) { if (simple) {
responseData = simplify(responseData); responseData = simplify(responseData);
} else if (returnAll && responseData.length > 1) { } else if (returnAll && responseData.length > 1) {
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
responseData = merge(responseData); responseData = merge(responseData);
} }

View file

@ -1,4 +1,3 @@
/* eslint-disable n8n-nodes-base/node-filename-against-convention */
import type { import type {
IExecuteFunctions, IExecuteFunctions,
INodeExecutionData, INodeExecutionData,

View file

@ -44,7 +44,7 @@ export async function getSchema(this: ILoadOptionsFunctions): Promise<INodePrope
returnData.push({ returnData.push({
name: field.name as string, name: field.name as string,
value: field.name as string, value: field.name as string,
// eslint-disable-next-line n8n-nodes-base/node-param-description-lowercase-first-char
description: description:
`type: ${field.type as string}` + (field.mode ? ` mode: ${field.mode as string}` : ''), `type: ${field.type as string}` + (field.mode ? ` mode: ${field.mode as string}` : ''),
}); });

View file

@ -1,4 +1,3 @@
/* eslint-disable n8n-nodes-base/node-filename-against-convention */
import type { import type {
IExecuteFunctions, IExecuteFunctions,
INodeType, INodeType,

View file

@ -49,7 +49,7 @@ const properties: INodeProperties[] = [
displayName: 'Google Docs', displayName: 'Google Docs',
name: 'docsToFormat', name: 'docsToFormat',
type: 'options', type: 'options',
// eslint-disable-next-line n8n-nodes-base/node-param-options-type-unsorted-items
options: [ options: [
{ {
name: 'HTML', name: 'HTML',

View file

@ -183,7 +183,6 @@ export async function folderSearchWithDefault(
} else { } else {
results = [ results = [
{ {
// eslint-disable-next-line n8n-nodes-base/node-param-display-name-miscased
name: rootDefaultDisplayName, name: rootDefaultDisplayName,
value: RLC_FOLDER_DEFAULT, value: RLC_FOLDER_DEFAULT,
url: 'https://drive.google.com/drive', url: 'https://drive.google.com/drive',

View file

@ -97,7 +97,6 @@ export function hexToRgb(hex: string) {
// Expand shorthand form (e.g. "03F") to full form (e.g. "0033FF") // Expand shorthand form (e.g. "03F") to full form (e.g. "0033FF")
const shorthandRegex = /^#?([a-f\d])([a-f\d])([a-f\d])$/i; const shorthandRegex = /^#?([a-f\d])([a-f\d])([a-f\d])$/i;
hex = hex.replace(shorthandRegex, (m, r, g, b) => { hex = hex.replace(shorthandRegex, (m, r, g, b) => {
// eslint-disable-next-line @typescript-eslint/restrict-plus-operands
return r + r + g + g + b + b; return r + r + g + g + b + b;
}); });

View file

@ -30,7 +30,6 @@ export const descriptions: INodeProperties[] = [
action: 'Append data to a sheet', action: 'Append data to a sheet',
}, },
{ {
// eslint-disable-next-line n8n-nodes-base/node-param-option-name-wrong-for-upsert
name: 'Append or Update', name: 'Append or Update',
value: 'appendOrUpdate', value: 'appendOrUpdate',
description: 'Append a new row or update the current one if it already exists (upsert)', description: 'Append a new row or update the current one if it already exists (upsert)',

View file

@ -66,7 +66,6 @@ export function hexToRgb(hex: string) {
// Expand shorthand form (e.g. "03F") to full form (e.g. "0033FF") // Expand shorthand form (e.g. "03F") to full form (e.g. "0033FF")
const shorthandRegex = /^#?([a-f\d])([a-f\d])([a-f\d])$/i; const shorthandRegex = /^#?([a-f\d])([a-f\d])([a-f\d])$/i;
hex = hex.replace(shorthandRegex, (m, r, g, b) => { hex = hex.replace(shorthandRegex, (m, r, g, b) => {
// eslint-disable-next-line @typescript-eslint/restrict-plus-operands
return r + r + g + g + b + b; return r + r + g + g + b + b;
}); });

View file

@ -7,7 +7,7 @@ const extractFunctions: {
} = { } = {
attribute: ($: Cheerio, valueData: IValueData): string | undefined => attribute: ($: Cheerio, valueData: IValueData): string | undefined =>
$.attr(valueData.attribute!), $.attr(valueData.attribute!),
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
html: ($: Cheerio, _valueData: IValueData): string | undefined => $.html() || undefined, html: ($: Cheerio, _valueData: IValueData): string | undefined => $.html() || undefined,
text: ($: Cheerio, _valueData: IValueData): string | undefined => $.text(), text: ($: Cheerio, _valueData: IValueData): string | undefined => $.text(),
value: ($: Cheerio, _valueData: IValueData): string | undefined => $.val(), value: ($: Cheerio, _valueData: IValueData): string | undefined => $.val(),

View file

@ -1,4 +1,3 @@
// eslint-disable-next-line n8n-nodes-base/node-filename-against-convention
import type { import type {
IExecuteFunctions, IExecuteFunctions,
IDataObject, IDataObject,

View file

@ -433,7 +433,6 @@ export const dealFields: INodeProperties[] = [
'<p>Used to include specific deal properties in the results. By default, the results will only include Deal ID and will not include the values for any properties for your Deals.</p><p>Including this parameter will include the data for the specified property in the results. You can include this parameter multiple times to request multiple properties separated by a comma: <code>,</code>.</p>. Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.', '<p>Used to include specific deal properties in the results. By default, the results will only include Deal ID and will not include the values for any properties for your Deals.</p><p>Including this parameter will include the data for the specified property in the results. You can include this parameter multiple times to request multiple properties separated by a comma: <code>,</code>.</p>. Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
}, },
{ {
// eslint-disable-next-line n8n-nodes-base/node-param-display-name-wrong-for-dynamic-multi-options
displayName: 'Properties with History', displayName: 'Properties with History',
name: 'propertiesWithHistory', name: 'propertiesWithHistory',
type: 'multiOptions', type: 'multiOptions',

View file

@ -29,7 +29,6 @@ type Aggregation = {
type Aggregations = Aggregation[]; type Aggregations = Aggregation[];
// eslint-disable-next-line no-restricted-syntax
const AggregationDisplayNames = { const AggregationDisplayNames = {
append: 'appended_', append: 'appended_',
average: 'average_', average: 'average_',

View file

@ -32,7 +32,6 @@ type Aggregation = {
type Aggregations = Aggregation[]; type Aggregations = Aggregation[];
// eslint-disable-next-line no-restricted-syntax
const AggregationDisplayNames = { const AggregationDisplayNames = {
append: 'appended_', append: 'appended_',
average: 'average_', average: 'average_',

View file

@ -793,7 +793,6 @@ export class Jira implements INodeType {
); );
} }
const executionData = this.helpers.constructExecutionMetaData( const executionData = this.helpers.constructExecutionMetaData(
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
this.helpers.returnJsonArray(simplifyIssueOutput(responseData)), this.helpers.returnJsonArray(simplifyIssueOutput(responseData)),
{ itemData: { item: i } }, { itemData: { item: i } },
); );

View file

@ -44,7 +44,6 @@ export class JiraTrigger implements INodeType {
}, },
}, },
{ {
// eslint-disable-next-line n8n-nodes-base/node-class-description-credentials-name-unsuffixed
name: 'httpQueryAuth', name: 'httpQueryAuth',
required: true, required: true,
displayOptions: { displayOptions: {

View file

@ -132,7 +132,7 @@ const formatValue = (value: any, format: string): any => {
// Only return if all values are properly parsed // Only return if all values are properly parsed
if (coordinates.length === points.length) { if (coordinates.length === points.length) {
// If the shape is closed, declare it as Polygon, otherwise as LineString // If the shape is closed, declare it as Polygon, otherwise as LineString
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
if (first(points) === last(points)) { if (first(points) === last(points)) {
return { return {
type: 'Polygon', type: 'Polygon',

View file

@ -1,4 +1,3 @@
/* eslint-disable n8n-nodes-base/node-filename-against-convention */
import type { import type {
ICredentialDataDecryptedObject, ICredentialDataDecryptedObject,
ICredentialsDecrypted, ICredentialsDecrypted,
@ -33,7 +32,6 @@ export class Ldap implements INodeType {
outputs: ['main'], outputs: ['main'],
credentials: [ credentials: [
{ {
// eslint-disable-next-line n8n-nodes-base/node-class-description-credentials-name-unsuffixed
name: 'ldap', name: 'ldap',
required: true, required: true,
testedBy: 'ldapConnectionTest', testedBy: 'ldapConnectionTest',
@ -132,7 +130,7 @@ export class Ldap implements INodeType {
const baseDN = this.getNodeParameter('baseDN', 0) as string; const baseDN = this.getNodeParameter('baseDN', 0) as string;
const results = await client.search(baseDN, { sizeLimit: 200, paged: false }); // should this size limit be set in credentials? const results = await client.search(baseDN, { sizeLimit: 200, paged: false }); // should this size limit be set in credentials?
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
const unique = Object.keys(Object.assign({}, ...results.searchEntries)); const unique = Object.keys(Object.assign({}, ...results.searchEntries));
return unique.map((x) => ({ return unique.map((x) => ({
name: x, name: x,
@ -183,7 +181,7 @@ export class Ldap implements INodeType {
const baseDN = this.getNodeParameter('dn', 0) as string; const baseDN = this.getNodeParameter('dn', 0) as string;
const results = await client.search(baseDN, { sizeLimit: 1, paged: false }); const results = await client.search(baseDN, { sizeLimit: 1, paged: false });
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
const unique = Object.keys(Object.assign({}, ...results.searchEntries)); const unique = Object.keys(Object.assign({}, ...results.searchEntries));
return unique.map((x) => ({ return unique.map((x) => ({
name: x, name: x,

View file

@ -253,7 +253,7 @@ export const issueFields: INodeProperties[] = [
displayName: 'Priority Name/ID', displayName: 'Priority Name/ID',
name: 'priorityId', name: 'priorityId',
type: 'options', type: 'options',
// eslint-disable-next-line n8n-nodes-base/node-param-options-type-unsorted-items
options: [ options: [
{ {
name: 'Urgent', name: 'Urgent',

View file

@ -11,7 +11,6 @@ import { linkedInApiRequest } from './GenericFunctions';
import { postFields, postOperations } from './PostDescription'; import { postFields, postOperations } from './PostDescription';
export class LinkedIn implements INodeType { export class LinkedIn implements INodeType {
// eslint-disable-next-line n8n-nodes-base/node-class-description-missing-subtitle
description: INodeTypeDescription = { description: INodeTypeDescription = {
displayName: 'LinkedIn', displayName: 'LinkedIn',
name: 'linkedIn', name: 'linkedIn',

View file

@ -142,7 +142,7 @@ export class LocalFileTrigger implements INodeType {
description: description:
'Files or paths to ignore. The whole path is tested, not just the filename. Supports <a href="https://github.com/micromatch/anymatch">Anymatch</a>- syntax.', 'Files or paths to ignore. The whole path is tested, not just the filename. Supports <a href="https://github.com/micromatch/anymatch">Anymatch</a>- syntax.',
}, },
// eslint-disable-next-line n8n-nodes-base/node-param-default-missing
{ {
displayName: 'Max Folder Depth', displayName: 'Max Folder Depth',
name: 'depth', name: 'depth',

View file

@ -378,7 +378,6 @@ export class LoneScale implements INodeType {
responseData = await lonescaleApiRequest.call(this, 'POST', '/lists', body); responseData = await lonescaleApiRequest.call(this, 'POST', '/lists', body);
const executionData = this.helpers.constructExecutionMetaData( const executionData = this.helpers.constructExecutionMetaData(
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
this.helpers.returnJsonArray(responseData), this.helpers.returnJsonArray(responseData),
{ itemData: { item: i } }, { itemData: { item: i } },
); );
@ -459,7 +458,6 @@ export class LoneScale implements INodeType {
body, body,
); );
const executionData = this.helpers.constructExecutionMetaData( const executionData = this.helpers.constructExecutionMetaData(
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
this.helpers.returnJsonArray(responseData), this.helpers.returnJsonArray(responseData),
{ itemData: { item: i } }, { itemData: { item: i } },
); );

View file

@ -124,7 +124,6 @@ export class LoneScaleTrigger implements INodeType {
const req = this.getRequestObject(); const req = this.getRequestObject();
return { return {
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
workflowData: [this.helpers.returnJsonArray(req.body)], workflowData: [this.helpers.returnJsonArray(req.body)],
}; };
} }

View file

@ -19,7 +19,7 @@ export class ManualTrigger implements INodeType {
name: 'When clicking "Execute Workflow"', name: 'When clicking "Execute Workflow"',
color: '#909298', color: '#909298',
}, },
// eslint-disable-next-line n8n-nodes-base/node-class-description-inputs-wrong-regular-node
inputs: [], inputs: [],
outputs: ['main'], outputs: ['main'],
properties: [ properties: [

View file

@ -1,4 +1,3 @@
/* eslint-disable n8n-nodes-base/node-filename-against-convention */
import type { import type {
IExecuteFunctions, IExecuteFunctions,
INodeType, INodeType,

View file

@ -75,7 +75,6 @@ const properties: INodeProperties[] = [
}, },
}, },
{ {
// eslint-disable-next-line n8n-nodes-base/node-param-display-name-wrong-for-dynamic-options
displayName: 'Column Names or IDs', displayName: 'Column Names or IDs',
name: 'column', name: 'column',
type: 'multiOptions', type: 'multiOptions',

View file

@ -101,7 +101,7 @@ export class MicrosoftSql implements INodeType {
}, },
}, },
default: '', default: '',
// eslint-disable-next-line n8n-nodes-base/node-param-placeholder-miscased-id
placeholder: 'SELECT id, name FROM product WHERE id < 40', placeholder: 'SELECT id, name FROM product WHERE id < 40',
required: true, required: true,
description: 'The SQL query to execute', description: 'The SQL query to execute',
@ -133,7 +133,7 @@ export class MicrosoftSql implements INodeType {
}, },
}, },
default: '', default: '',
// eslint-disable-next-line n8n-nodes-base/node-param-placeholder-miscased-id
placeholder: 'id,name,description', placeholder: 'id,name,description',
description: description:
'Comma-separated list of the properties which should used as columns for the new rows', 'Comma-separated list of the properties which should used as columns for the new rows',

View file

@ -1,4 +1,3 @@
/* eslint-disable n8n-nodes-base/node-filename-against-convention */
import type { import type {
IExecuteFunctions, IExecuteFunctions,
INodeExecutionData, INodeExecutionData,

View file

@ -49,7 +49,7 @@ const properties: INodeProperties[] = [
}, },
}, },
{ {
// eslint-disable-next-line n8n-nodes-base/node-param-display-name-miscased, n8n-nodes-base/node-param-display-name-wrong-for-dynamic-options // eslint-disable-next-line n8n-nodes-base/node-param-display-name-wrong-for-dynamic-options
displayName: 'Column to Match On', displayName: 'Column to Match On',
name: 'columnToMatchOn', name: 'columnToMatchOn',
type: 'options', type: 'options',

View file

@ -49,7 +49,7 @@ const properties: INodeProperties[] = [
}, },
}, },
{ {
// eslint-disable-next-line n8n-nodes-base/node-param-display-name-miscased, n8n-nodes-base/node-param-display-name-wrong-for-dynamic-options // eslint-disable-next-line n8n-nodes-base/node-param-display-name-wrong-for-dynamic-options
displayName: 'Column to Match On', displayName: 'Column to Match On',
name: 'columnToMatchOn', name: 'columnToMatchOn',
type: 'options', type: 'options',

View file

@ -1,4 +1,3 @@
/* eslint-disable n8n-nodes-base/node-param-default-missing */
import { getCursorPaginator } from './GenericFunctions'; import { getCursorPaginator } from './GenericFunctions';
import type { INodeProperties } from 'n8n-workflow'; import type { INodeProperties } from 'n8n-workflow';
import { workflowIdLocator } from './WorkflowLocator'; import { workflowIdLocator } from './WorkflowLocator';

View file

@ -13,7 +13,6 @@ import { getDatabases } from './SearchFunctions';
export class NotionTrigger implements INodeType { export class NotionTrigger implements INodeType {
description: INodeTypeDescription = { description: INodeTypeDescription = {
// eslint-disable-next-line n8n-nodes-base/node-class-description-display-name-unsuffixed-trigger-node
displayName: 'Notion Trigger', displayName: 'Notion Trigger',
name: 'notionTrigger', name: 'notionTrigger',
icon: 'file:notion.svg', icon: 'file:notion.svg',

View file

@ -254,7 +254,6 @@ export const contactDescription: INodeProperties[] = [
}, },
options: [ options: [
{ {
// eslint-disable-next-line n8n-nodes-base/node-param-display-name-wrong-for-dynamic-multi-options
displayName: 'Fields to Include', displayName: 'Fields to Include',
name: 'fieldsList', name: 'fieldsList',
type: 'multiOptions', type: 'multiOptions',

View file

@ -175,7 +175,6 @@ export const customResourceDescription: INodeProperties[] = [
}, },
options: [ options: [
{ {
// eslint-disable-next-line n8n-nodes-base/node-param-display-name-wrong-for-dynamic-multi-options
displayName: 'Fields to Include', displayName: 'Fields to Include',
name: 'fieldsList', name: 'fieldsList',
type: 'multiOptions', type: 'multiOptions',

View file

@ -156,7 +156,6 @@ export const noteDescription: INodeProperties[] = [
}, },
options: [ options: [
{ {
// eslint-disable-next-line n8n-nodes-base/node-param-display-name-wrong-for-dynamic-multi-options
displayName: 'Fields to Include', displayName: 'Fields to Include',
name: 'fieldsList', name: 'fieldsList',
type: 'multiOptions', type: 'multiOptions',

View file

@ -207,7 +207,6 @@ export const opportunityDescription: INodeProperties[] = [
}, },
options: [ options: [
{ {
// eslint-disable-next-line n8n-nodes-base/node-param-display-name-wrong-for-dynamic-multi-options
displayName: 'Fields to Include', displayName: 'Fields to Include',
name: 'fieldsList', name: 'fieldsList',
type: 'multiOptions', type: 'multiOptions',

View file

@ -68,7 +68,6 @@ const completeOperations: INodeProperties[] = [
{ {
type: 'setKeyValue', type: 'setKeyValue',
properties: { properties: {
// eslint-disable-next-line n8n-nodes-base/node-param-display-name-miscased-id
name: '={{$responseItem.id}}', name: '={{$responseItem.id}}',
value: '={{$responseItem.id}}', value: '={{$responseItem.id}}',
}, },

View file

@ -94,7 +94,6 @@ const completeOperations: INodeProperties[] = [
{ {
type: 'setKeyValue', type: 'setKeyValue',
properties: { properties: {
// eslint-disable-next-line n8n-nodes-base/node-param-display-name-miscased-id
name: '={{$responseItem.id}}', name: '={{$responseItem.id}}',
value: '={{$responseItem.id}}', value: '={{$responseItem.id}}',
}, },

View file

@ -1,4 +1,3 @@
/* eslint-disable n8n-nodes-base/node-filename-against-convention */
import type { import type {
IExecuteFunctions, IExecuteFunctions,
INodeExecutionData, INodeExecutionData,

View file

@ -67,7 +67,7 @@ const properties: INodeProperties[] = [
}, },
}, },
{ {
// eslint-disable-next-line n8n-nodes-base/node-param-display-name-miscased, n8n-nodes-base/node-param-display-name-wrong-for-dynamic-options // eslint-disable-next-line n8n-nodes-base/node-param-display-name-wrong-for-dynamic-options
displayName: 'Column to Match On', displayName: 'Column to Match On',
name: 'columnToMatchOn', name: 'columnToMatchOn',
type: 'options', type: 'options',

View file

@ -66,7 +66,7 @@ const properties: INodeProperties[] = [
}, },
}, },
{ {
// eslint-disable-next-line n8n-nodes-base/node-param-display-name-miscased, n8n-nodes-base/node-param-display-name-wrong-for-dynamic-options // eslint-disable-next-line n8n-nodes-base/node-param-display-name-wrong-for-dynamic-options
displayName: 'Unique Column', displayName: 'Unique Column',
name: 'columnToMatchOn', name: 'columnToMatchOn',
type: 'options', type: 'options',

View file

@ -92,7 +92,7 @@ export class Pushover implements INodeType {
default: '', default: '',
description: 'Your message', description: 'Your message',
}, },
// eslint-disable-next-line n8n-nodes-base/node-param-default-missing
{ {
displayName: 'Priority', displayName: 'Priority',
name: 'priority', name: 'priority',

View file

@ -270,7 +270,6 @@ export async function loadResource(this: ILoadOptionsFunctions, resource: string
if (resource === 'preferences') { if (resource === 'preferences') {
const { const {
// eslint-disable-next-line @typescript-eslint/no-shadow
SalesFormsPrefs: { CustomField }, SalesFormsPrefs: { CustomField },
} = resourceItems[0]; } = resourceItems[0];
const customFields = CustomField[1].CustomField; const customFields = CustomField[1].CustomField;

View file

@ -17,7 +17,6 @@ import { rabbitmqConnectExchange, rabbitmqConnectQueue } from './GenericFunction
export class RabbitMQ implements INodeType { export class RabbitMQ implements INodeType {
description: INodeTypeDescription = { description: INodeTypeDescription = {
// eslint-disable-next-line
displayName: 'RabbitMQ', displayName: 'RabbitMQ',
name: 'rabbitmq', name: 'rabbitmq',
// eslint-disable-next-line n8n-nodes-base/node-class-description-icon-not-svg // eslint-disable-next-line n8n-nodes-base/node-class-description-icon-not-svg

View file

@ -126,7 +126,7 @@ export class RabbitMQTrigger implements INodeType {
default: false, default: false,
description: 'Whether to return only the content property', description: 'Whether to return only the content property',
}, },
// eslint-disable-next-line n8n-nodes-base/node-param-default-missing
{ {
displayName: 'Parallel Message Processing Limit', displayName: 'Parallel Message Processing Limit',
name: 'parallelMessages', name: 'parallelMessages',

View file

@ -70,7 +70,7 @@ export class ReadBinaryFile implements INodeType {
const stream = await this.helpers.createReadStream(filePath); const stream = await this.helpers.createReadStream(filePath);
const dataPropertyName = this.getNodeParameter('dataPropertyName', itemIndex); const dataPropertyName = this.getNodeParameter('dataPropertyName', itemIndex);
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
newItem.binary![dataPropertyName] = await this.helpers.prepareBinaryData(stream, filePath); newItem.binary![dataPropertyName] = await this.helpers.prepareBinaryData(stream, filePath);
returnData.push(newItem); returnData.push(newItem);
} catch (error) { } catch (error) {

View file

@ -27,7 +27,7 @@ export class ScheduleTrigger implements INodeType {
name: 'Schedule Trigger', name: 'Schedule Trigger',
color: '#31C49F', color: '#31C49F',
}, },
// eslint-disable-next-line n8n-nodes-base/node-class-description-inputs-wrong-regular-node
inputs: [], inputs: [],
outputs: ['main'], outputs: ['main'],
properties: [ properties: [

View file

@ -54,7 +54,6 @@ export async function sendGridApiRequestAllItems(
let uri; let uri;
do { do {
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
responseData = await sendGridApiRequest.call(this, endpoint, method, body, query, uri); // possible bug, as function does not have uri parameter responseData = await sendGridApiRequest.call(this, endpoint, method, body, query, uri); // possible bug, as function does not have uri parameter
uri = responseData._metadata.next; uri = responseData._metadata.next;
returnData.push.apply(returnData, responseData[propertyName] as IDataObject[]); returnData.push.apply(returnData, responseData[propertyName] as IDataObject[]);

View file

@ -55,7 +55,7 @@ export async function spotifyApiRequestAllItems(
do { do {
responseData = await spotifyApiRequest.call(this, method, endpoint, body, query, uri); responseData = await spotifyApiRequest.call(this, method, endpoint, body, query, uri);
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
returnData.push.apply(returnData, get(responseData, propertyName)); returnData.push.apply(returnData, get(responseData, propertyName));
uri = responseData.next || responseData[propertyName.split('.')[0]].next; uri = responseData.next || responseData[propertyName.split('.')[0]].next;
//remove the query as the query parameters are already included in the next, else api throws error. //remove the query as the query parameters are already included in the next, else api throws error.

View file

@ -362,7 +362,7 @@ export class Spotify implements INodeType {
resource: ['playlist'], resource: ['playlist'],
}, },
}, },
// eslint-disable-next-line n8n-nodes-base/node-param-options-type-unsorted-items
options: [ options: [
{ {
name: 'Add an Item', name: 'Add an Item',

View file

@ -71,7 +71,7 @@ export function getFilters(
includeNoneOption = true, includeNoneOption = true,
filterTypeDisplayName = 'Filter', filterTypeDisplayName = 'Filter',
filterFixedCollectionDisplayName = 'Filters', filterFixedCollectionDisplayName = 'Filters',
// eslint-disable-next-line @typescript-eslint/no-unused-vars
filterStringDisplayName = 'Filters (String)', filterStringDisplayName = 'Filters (String)',
mustMatchOptions = [ mustMatchOptions = [
{ {

View file

@ -477,7 +477,6 @@ export class Switch implements INodeType {
], ],
}, },
// eslint-disable-next-line n8n-nodes-base/node-param-default-missing
{ {
displayName: 'Fallback Output', displayName: 'Fallback Output',
name: 'fallbackOutput', name: 'fallbackOutput',

View file

@ -96,7 +96,6 @@ export const issueFields: INodeProperties[] = [
}, },
options: [ options: [
{ {
// eslint-disable-next-line n8n-nodes-base/node-param-display-name-wrong-for-dynamic-options
displayName: 'Assignee Name or ID', displayName: 'Assignee Name or ID',
name: 'assigned_to', name: 'assigned_to',
type: 'options', type: 'options',

View file

@ -179,7 +179,7 @@ export const channelFields: INodeProperties[] = [
default: false, default: false,
description: 'Whether the channel will be marked as public', description: 'Whether the channel will be marked as public',
}, },
// eslint-disable-next-line n8n-nodes-base/node-param-default-missing
{ {
displayName: 'Temp ID', displayName: 'Temp ID',
name: 'temp_id', name: 'temp_id',

View file

@ -93,12 +93,11 @@ export class TypeformTrigger implements INodeType {
'Form which should trigger workflow on submission. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.', 'Form which should trigger workflow on submission. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
}, },
{ {
// eslint-disable-next-line n8n-nodes-base/node-param-display-name-wrong-for-simplify
displayName: 'Simplify Answers', displayName: 'Simplify Answers',
name: 'simplifyAnswers', name: 'simplifyAnswers',
type: 'boolean', type: 'boolean',
default: true, default: true,
// eslint-disable-next-line n8n-nodes-base/node-param-description-wrong-for-simplify
description: description:
'Whether to convert the answers to a key:value pair ("FIELD_TITLE":"USER_ANSER") to be easily processable', 'Whether to convert the answers to a key:value pair ("FIELD_TITLE":"USER_ANSER") to be easily processable',
}, },

View file

@ -122,7 +122,7 @@ export const maintenanceWindowFields: INodeProperties[] = [
type: [3], type: [3],
}, },
}, },
// eslint-disable-next-line n8n-nodes-base/node-param-options-type-unsorted-items
options: [ options: [
{ {
name: 'Monday', name: 'Monday',
@ -354,7 +354,7 @@ export const maintenanceWindowFields: INodeProperties[] = [
type: [3], type: [3],
}, },
}, },
// eslint-disable-next-line n8n-nodes-base/node-param-options-type-unsorted-items
options: [ options: [
{ {
name: 'Monday', name: 'Monday',

View file

@ -234,7 +234,7 @@ export const monitorFields: INodeProperties[] = [
name: 'statuses', name: 'statuses',
type: 'multiOptions', type: 'multiOptions',
default: [], default: [],
// eslint-disable-next-line n8n-nodes-base/node-param-multi-options-type-unsorted-items
options: [ options: [
{ {
name: 'Paused', name: 'Paused',

View file

@ -97,7 +97,7 @@ export class WriteBinaryFile implements INodeType {
} }
// Write the file to disk // Write the file to disk
// eslint-disable-next-line @typescript-eslint/no-unsafe-call
await this.helpers.writeContentToFile(fileName, fileContent, flag); await this.helpers.writeContentToFile(fileName, fileContent, flag);
if (item.binary !== undefined) { if (item.binary !== undefined) {

View file

@ -21,8 +21,8 @@
"build:translations": "gulp build:translations", "build:translations": "gulp build:translations",
"build:metadata": "pnpm n8n-generate-known && pnpm n8n-generate-ui-types", "build:metadata": "pnpm n8n-generate-known && pnpm n8n-generate-ui-types",
"format": "prettier --write . --ignore-path ../../.prettierignore", "format": "prettier --write . --ignore-path ../../.prettierignore",
"lint": "eslint --quiet .; node ./scripts/validate-load-options-methods.js", "lint": "eslint . --quiet --report-unused-disable-directives; node ./scripts/validate-load-options-methods.js",
"lintfix": "eslint . --fix", "lintfix": "eslint . --fix --report-unused-disable-directives",
"watch": "tsc-watch -p tsconfig.build.json --onSuccess \"pnpm n8n-generate-ui-types\"", "watch": "tsc-watch -p tsconfig.build.json --onSuccess \"pnpm n8n-generate-ui-types\"",
"test": "jest" "test": "jest"
}, },

View file

@ -65,7 +65,7 @@ export function flatten<T>(nestedArray: T[][]) {
})(nestedArray); })(nestedArray);
//TODO: check logic in MicrosoftSql.node.ts //TODO: check logic in MicrosoftSql.node.ts
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-return
return result as any; return result as any;
} }