The number of inputs
in node class description for trigger node should be zero.
📋 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:
class TestNode {
description = {
displayName: "Test",
name: "test",
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"],
};
}
class TestNode {
description = {
displayName: "Test",
name: "test",
icon: "file:test.svg",
group: ["transform"],
version: 1,
subtitle: '={{ $parameter["operation"] + ": " + $parameter["resource"] }}',
description: "This is a sentence",
defaults: {
name: "Test",
},
inputs: ["wrong"],
outputs: ["main"],
};
}
class TestNode {
description = {
displayName: "Test",
name: "test",
icon: "file:test.svg",
group: ["transform"],
version: 1,
subtitle: '={{ $parameter["operation"] + ": " + $parameter["resource"] }}',
description: "This is a sentence",
defaults: {
name: "Test",
},
inputs: ["main", "main"],
outputs: ["main"],
};
}
✅ Example of correct code:
class TestNode {
description = {
displayName: "Test",
name: "test",
icon: "file:test.svg",
group: ["transform"],
version: 1,
subtitle: '={{ $parameter["operation"] + ": " + $parameter["resource"] }}',
description: "This is a sentence",
defaults: {
name: "Test",
},
inputs: [],
outputs: ["main"],
};
}