Skip to content

Latest commit

 

History

History
104 lines (87 loc) · 1.81 KB

node-param-display-name-wrong-for-dynamic-options.md

File metadata and controls

104 lines (87 loc) · 1.81 KB

node-param-display-name-wrong-for-dynamic-options

displayName for dynamic-options-type node parameter must end with Name or ID

📋 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: "Field ID",
	name: "field",
	type: "options",
	typeOptions: {
		loadOptionsMethod: "getFields",
	},
	default: "",
};

const test = {
	displayName: "Field Name",
	name: "field",
	type: "options",
	typeOptions: {
		loadOptionsMethod: "getFields",
	},
	default: "",
};

const test = {
	displayName: "Field Name or",
	name: "field",
	type: "options",
	typeOptions: {
		loadOptionsMethod: "getFields",
	},
	default: "",
};

const test = {
	displayName: "Field Name/ID",
	name: "field",
	type: "options",
	typeOptions: {
		loadOptionsMethod: "getFields",
	},
	default: "",
};

const test = {
	displayName: "Field ID/Name",
	name: "field",
	type: "options",
	typeOptions: {
		loadOptionsMethod: "getFields",
	},
	default: "",
};

const test = {
	displayName: "Field Names/IDs",
	name: "field",
	type: "options",
	typeOptions: {
		loadOptionsMethod: "getFields",
	},
	default: "",
};

const test = {
	displayName: "Field",
	name: "field",
	type: "options",
	typeOptions: {
		loadOptionsMethod: "getFields",
	},
	default: "",
};

✅ Example of correct code:

const test = {
	displayName: "Field Name or ID",
	name: "field",
	type: "options",
	typeOptions: {
		loadOptionsMethod: "getFields",
	},
	default: "",
};

Links