Items in collection-type node parameter must not have a required
property.
📋 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: "Options",
name: "options",
type: "collection",
placeholder: "Add Option",
default: {},
displayOptions: {
show: {
resource: ["collection"],
operation: ["getAll"],
},
},
options: [
{
displayName: "First",
name: "first",
type: "boolean",
required: true,
default: true,
},
{
displayName: "Second",
name: "second",
type: "string",
default: "",
},
],
};
✅ Example of correct code:
const test = {
displayName: "Options",
name: "options",
type: "collection",
placeholder: "Add Option",
default: {},
displayOptions: {
show: {
resource: ["collection"],
operation: ["getAll"],
},
},
options: [
{
displayName: "First",
name: "first",
type: "boolean",
default: true,
},
{
displayName: "Second",
name: "second",
type: "string",
default: "",
},
],
};