Skip to content

Latest commit

 

History

History
56 lines (46 loc) · 1.16 KB

node-class-description-icon-not-svg.md

File metadata and controls

56 lines (46 loc) · 1.16 KB

node-class-description-icon-not-svg

icon in node class description should be an SVG icon.

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

Examples

❌ Example of incorrect code:

class TestNode {
	description = {
		displayName: "Test",
		name: "testTrigger",
		icon: "file:test.png",
		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: "TestTrigger",
		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