Skip to content

Latest commit

 

History

History
75 lines (63 loc) · 1.69 KB

node-class-description-display-name-unsuffixed-trigger-node.md

File metadata and controls

75 lines (63 loc) · 1.69 KB

node-class-description-display-name-unsuffixed-trigger-node

displayName in node class description for trigger node must be suffixed with -Trigger.

📋 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:

class TestNode {
	description = {
		displayName: "Test",
		name: "testTrigger",
		icon: "file:test.svg",
		group: ["transform"],
		version: 1,
		subtitle: '={{ $parameter["operation"] + ": " + $parameter["resource"] }}',
		description: "This is a sentence",
		defaults: {
			name: "Test",
		},
		inputs: ["main"],
		outputs: ["main"],
	};
}

✅ Example of correct code:

class TestNode {
	description = {
		displayName: "Test Trigger",
		name: "testTrigger",
		icon: "file:test.svg",
		group: ["transform"],
		version: 1,
		subtitle: '={{ $parameter["operation"] + ": " + $parameter["resource"] }}',
		description: "This is a sentence",
		defaults: {
			name: "Test",
		},
		inputs: ["main"],
		outputs: ["main"],
	};
}

class TestNode {
	description = {
		displayName: "Test Trigger (Beta)",
		name: "testTrigger",
		icon: "file:test.svg",
		group: ["transform"],
		version: 1,
		subtitle: '={{ $parameter["operation"] + ": " + $parameter["resource"] }}',
		description: "This is a sentence",
		defaults: {
			name: "Test",
		},
		inputs: ["main"],
		outputs: ["main"],
	};
}

Links