Skip to content

Latest commit

 

History

History
66 lines (55 loc) · 1.31 KB

node-param-operation-option-action-wrong-for-get-many.md

File metadata and controls

66 lines (55 loc) · 1.31 KB

node-param-operation-option-action-wrong-for-get-many

The property action in a Get Many option in an Operation node parameter must start with Get many.

📋 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: "Operation",
	name: "operation",
	type: "options",
	noDataExpression: true,
	displayOptions: {
		show: {
			resource: ["entity"],
		},
	},
	default: "getAll",
	options: [
		{
			name: "Get Many",
			value: "getAll",
			description: "Retrieve many entities",
			action: "Get all entities",
		},
	],
};

✅ Example of correct code:

const test = {
	displayName: "Operation",
	name: "operation",
	type: "options",
	noDataExpression: true,
	displayOptions: {
		show: {
			resource: ["entity"],
		},
	},
	default: "getAll",
	options: [
		{
			name: "Get Many",
			value: "getAll",
			description: "Retrieve many entities",
			action: "Get many entities",
		},
	],
};

Links