n8n:create-community-node-lint-rule

Contributors

GitHub-linked commit authors for this SKILL.md at the saved revision. Co-authors and history before file renames are not included.

File history ↗

Create new ESLint rules for the @n8n/eslint-plugin-community-nodes package. Use when adding a lint rule, creating a community node lint, or working on eslint-plugin-community-nodes. Guides rule implementation, tests, docs, and plugin registration.

.agents/skills/create-community-node-lint-rule/SKILL.md

Download bundle ↓
master · 8bff5da2 bundle filesScanned 2026-09-15

reference.md

886 tokens · o200k_base · 3,685 bytes

AST & File Utilities Reference

Helpers available from ../utils/index.js. Use these instead of writing custom AST traversal.

ast-utils.ts

Class/Interface detection

FunctionReturnsUse when
isNodeTypeClass(node)booleanCheck if class implements INodeType or extends Node
isCredentialTypeClass(node)booleanCheck if class implements ICredentialType

Property finding

FunctionReturnsUse when
findClassProperty(node, name)PropertyDefinition | nullFind a property on a class (e.g. description, icon)
findObjectProperty(obj, name)Property | nullFind a property in an object literal (Identifier key)
findJsonProperty(obj, name)Property | nullFind a property with a Literal key (JSON-style "key")
findArrayLiteralProperty(obj, name)Property | nullFind a property whose value is an ArrayExpression

Value extraction

FunctionReturnsUse when
getLiteralValue(node)string | boolean | number | nullExtract primitive from a Literal node
getStringLiteralValue(node)string | nullExtract string specifically
getBooleanLiteralValue(node)boolean | nullExtract boolean specifically
getModulePath(node)string | nullGet import path from string literal or template literal

Array operations

FunctionReturnsUse when
hasArrayLiteralValue(arr, value)booleanCheck if array contains a specific string literal
extractCredentialInfoFromArray(element){ name, testedBy } | nullParse credential object from array element
extractCredentialNameFromArray(element)string | nullGet just the credential name from array element

Method matching

FunctionReturnsUse when
isThisHelpersAccess(node)booleanMatch this.helpers member expression
isThisMethodCall(node, method)booleanMatch this.methodName(...) calls
isThisHelpersMethodCall(node, method)booleanMatch this.helpers.methodName(...) calls

Similarity

FunctionReturnsUse when
findSimilarStrings(target, candidates, maxDistance?)string[]Suggest similar names (Levenshtein distance)

file-utils.ts

Path operations

FunctionUse when
isContainedWithin(child, parent)Check path is within a directory
safeJoinPath(base, ...parts)Join paths with traversal prevention

Package.json

FunctionReturnsUse when
findPackageJson(startDir)string | nullWalk up to find nearest package.json
readPackageJsonN8n(startDir)N8nPackageJson | nullParse n8n config section
readPackageJsonCredentials(startDir)Set<string>Get credential names from package.json
readPackageJsonNodes(startDir)string[]Get resolved node file paths

File system

FunctionUse when
validateIconPath(filePath, iconValue)Check icon file exists and is SVG
extractCredentialNameFromFile(filePath)Parse credential class name from file
fileExistsWithCaseSync(filePath)Case-sensitive existence check
findSimilarSvgFiles(dir, name)Suggest similar SVG filenames

Credential verification

FunctionUse when
areAllCredentialUsagesTestedByNodes(startDir)Check all credentials have testedBy
Referenced from SKILL.md