All skills
Skillintermediate

Disallow string literals in node description `inputs`/`outputs` — use `NodeConnectionTypes` enum instead (`@n8n/community-nodes/node-connection-type-l

šŸ’¼ This rule is enabled in the following configs: āœ… `recommended`, ā˜‘ļø `recommendedWithoutN8nCloudSupport`.

Claude Code Knowledge Pack7/10/2026

Overview

Disallow string literals in node description inputs/outputs — use NodeConnectionTypes enum instead (@n8n/community-nodes/node-connection-type-literal)

šŸ’¼ This rule is enabled in the following configs: āœ… recommended, ā˜‘ļø recommendedWithoutN8nCloudSupport.

šŸ”§ This rule is automatically fixable by the --fix CLI option.

Rule Details

Using raw string literals like 'main' in inputs and outputs is fragile: the values are not type-checked, and typos or renamed connection types will go undetected. The NodeConnectionTypes object from n8n-workflow is the single source of truth and should always be used instead.

Examples

āŒ Incorrect


  description: INodeTypeDescription = {
    displayName: 'My Node',
    name: 'myNode',
    inputs: ['main'],
    outputs: ['main'],
    properties: [],
  };
}

āœ… Correct


  description: INodeTypeDescription = {
    displayName: 'My Node',
    name: 'myNode',
    inputs: [NodeConnectionTypes.Main],
    outputs: [NodeConnectionTypes.Main],
    properties: [],
  };
}