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.
❌ 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: "",
};