n8n/packages/@n8n/eslint-plugin-community-nodes
n8n-assistant[bot] 61be42c7bb
🚀 Release 2.21.0 (#30283)
Co-authored-by: Matsuuu <16068444+Matsuuu@users.noreply.github.com>
2026-05-12 07:29:34 +00:00
..
docs/rules docs: Correct rationale for no-overrides-field ESLint rule (#29973) 2026-05-07 10:07:14 +00:00
src refactor: Rename node-level builderHint.message to searchHint and propertyHint (#30062) 2026-05-08 13:32:50 +00:00
eslint.config.mjs feat: Add docs to @n8n/eslint-plugin-community-nodes (#20266) 2025-10-13 13:03:30 +02:00
package.json 🚀 Release 2.21.0 (#30283) 2026-05-12 07:29:34 +00:00
README.md feat: Add cred-class-name-suffix lint rule (no-changelog) (#29801) 2026-05-06 16:00:49 +00:00
tsconfig.build.json feat: Add docs to @n8n/eslint-plugin-community-nodes (#20266) 2025-10-13 13:03:30 +02:00
tsconfig.eslint.json feat: Add docs to @n8n/eslint-plugin-community-nodes (#20266) 2025-10-13 13:03:30 +02:00
tsconfig.json chore: Prepare tsconfigs for tsgo (#29230) 2026-04-27 12:30:22 +00:00
vite.config.ts feat: Add community node ESLint plugin, use in scanner (#19660) 2025-09-26 14:41:35 +02:00

@n8n/eslint-plugin-community-nodes

ESLint plugin for linting n8n community node packages to ensure consistency and best practices.

Install

npm install --save-dev eslint @n8n/eslint-plugin-community-nodes

**Requires ESLint >=9 and flat config

Usage

See the ESLint docs for more information about extending config files.

This plugin exports a recommended config that enforces good practices.

import { n8nCommunityNodesPlugin } from '@n8n/eslint-plugin-community-nodes';

export default [
		// …
		n8nCommunityNodesPlugin.configs.recommended,
		{
			rules: {
				'@n8n/community-nodes/node-usable-as-tool': 'warn',
			},
		},
];

Rules

💼 Configurations enabled in.
⚠️ Configurations set to warn in.
Set in the recommended configuration.
☑️ Set in the recommendedWithoutN8nCloudSupport configuration.
🔧 Automatically fixable by the --fix CLI option.
💡 Manually fixable by editor suggestions.
Deprecated.

Name                                Description 💼 ⚠️ 🔧 💡
ai-node-package-json Enforce consistency between n8n.aiNodeSdkVersion and ai-node-sdk peer dependency in community node packages ☑️
cred-class-field-icon-missing Credential class must have an icon property defined ☑️ 💡
cred-class-name-suffix Credential class names must be suffixed with Api ☑️ 🔧
cred-class-oauth2-naming OAuth2 credentials must include OAuth2 in the class name, name, and displayName ☑️ 🔧
credential-documentation-url Enforce valid credential documentationUrl format (URL or lowercase alphanumeric slug) ☑️ 🔧
credential-password-field Ensure credential fields with sensitive names have typeOptions.password = true ☑️ 🔧
credential-test-required Ensure credentials have a credential test ☑️ 💡
icon-validation Validate node and credential icon files exist, are SVG format, and light/dark icons are different ☑️ 💡
missing-paired-item Require pairedItem on INodeExecutionData objects in execute() methods to preserve item linking. ☑️
n8n-object-validation Validate the structure of the "n8n" object in community node package.json (required keys, types, and dist/ paths) ☑️
no-credential-reuse Prevent credential re-use security issues by ensuring nodes only reference credentials from the same package ☑️ 💡
no-deprecated-workflow-functions Disallow usage of deprecated functions and types from n8n-workflow package ☑️ 💡
no-forbidden-lifecycle-scripts Ban lifecycle scripts (prepare, preinstall, postinstall, etc.) in community node packages ☑️
no-http-request-with-manual-auth Disallow this.helpers.httpRequest() in functions that call this.getCredentials(). Use this.helpers.httpRequestWithAuthentication() instead. ☑️
no-overrides-field Ban the "overrides" field in community node package.json ☑️
no-restricted-globals Disallow usage of restricted global variables in community nodes.
no-restricted-imports Disallow usage of restricted imports in community nodes.
no-runtime-dependencies Disallow non-empty "dependencies" in community node package.json ☑️
no-template-placeholders Disallow unresolved template placeholders in package.json ☑️
node-class-description-icon-missing Node class description must have an icon property defined. Deprecated: use require-node-description-fields instead. 💡
node-connection-type-literal Disallow string literals in node description inputs/outputs — use NodeConnectionTypes enum instead ☑️ 🔧
node-operation-error-itemindex Require { itemIndex } in NodeOperationError / NodeApiError options inside item loops ☑️
node-usable-as-tool Ensure node classes have usableAsTool property ☑️ 🔧
options-sorted-alphabetically Enforce alphabetical ordering of options arrays in n8n node properties ☑️
package-name-convention Enforce correct package naming convention for n8n community nodes ☑️ 💡
require-community-node-keyword Require the "n8n-community-node-package" keyword in community node package.json ☑️ 🔧
require-continue-on-fail Require continueOnFail() handling in execute() methods of node classes ☑️
require-node-api-error Require NodeApiError or NodeOperationError for error wrapping in catch blocks. Raw errors lose HTTP context in the n8n UI. ☑️
require-node-description-fields Node class description must define all required fields: icon, subtitle ☑️
resource-operation-pattern Enforce proper resource/operation pattern for better UX in n8n nodes ☑️
valid-credential-references Ensure credentials referenced in node descriptions exist as credential classes in the package ☑️ 💡
valid-peer-dependencies Require community node package.json peerDependencies to contain only "n8n-workflow": "*" (and optionally "ai-node-sdk") ☑️ 🔧
webhook-lifecycle-complete Require webhook trigger nodes to implement the complete webhookMethods lifecycle (checkExists, create, delete) ☑️