Skip to content

Latest commit

 

History

History
122 lines (104 loc) · 2.17 KB

node-param-display-name-miscased.md

File metadata and controls

122 lines (104 loc) · 2.17 KB

node-param-display-name-miscased

displayName in node parameter or in fixed collection section must title cased. Applicable by extension to name in options-type or multi-options-type node parameter.

📋 This rule is part of the plugin:n8n-nodes-base/nodes config.

🔧 Run ESLint with --fix option to autofix the issue flagged by this rule.

Examples

❌ Example of incorrect code:

const test = {
	displayName: "Test of tests",
	name: "testOfTests",
	type: "string",
	default: "",
};

const test = {
	name: "Using 'Respond to Webhook' node",
	value: "responseNode",
	description: "Response defined in that node",
};

const test = {
	displayName: "Deal's contact ID",
	name: "testOfTests",
	type: "string",
	default: "",
};

const test = {
	name: "Test of tests",
	value: "testOfTests",
};

const test = {
	displayName: "Test",
	name: "test",
	type: "fixedCollection",
	default: "a",
	options: [
		{
			displayName: "Details test",
			name: "detailsTest",
			values: [
				{
					displayName: "A",
					name: "a",
					type: "string",
					default: "",
				},
			],
		},
	],
};

✅ Example of correct code:

const test = {
	displayName: "Test of Tests",
	name: "testOfTests",
	type: "string",
	default: "",
};

const test = {
	name: "Test of Tests",
	value: "testOfTests",
};

const test = {
	displayName: "API Domain",
	name: "apiDomain",
	type: "options",
	options: [
		{
			name: "api.jotform.com",
			value: "api.jotform.com",
		},
		{
			name: "eu-api.jotform.com",
			value: "eu-api.jotform.com",
		},
	],
	default: "api.jotform.com",
	description:
		'The API domain to use. Use "eu-api.jotform.com" if your account is in based in Europe.',
};

const test = {
	displayName: "SASL Mechanism",
	name: "saslMechanism",
	type: "options",
	options: [
		{
			name: "Plain",
			value: "plain",
		},
		{
			name: "scram-sha-256",
			value: "scram-sha-256",
		},
		{
			name: "scram-sha-512",
			value: "scram-sha-512",
		},
	],
	default: "plain",
};

Links