Files
n8n/packages/@n8n/eslint-plugin-community-nodes/docs/rules/credential-documentation-url.md
alighasami 3d5eaf9445
Some checks failed
Security: Sync from Public / sync-from-public (push) Has been cancelled
Test: Benchmark Nightly / build (push) Has been cancelled
Test: Benchmark Nightly / Notify Cats on failure (push) Has been cancelled
CI: Python / Checks (push) Has been cancelled
Test: Evals Python / Workflow Comparison Python (push) Has been cancelled
Util: Check Docs URLs / check-docs-urls (push) Has been cancelled
Test: Visual Storybook / Cloudflare Pages (push) Has been cancelled
Test: E2E Performance / build-and-test-performance (push) Has been cancelled
Test: Workflows Nightly / Run Workflow Tests (push) Has been cancelled
Util: Cleanup CI Docker Images / Delete stale CI images (push) Has been cancelled
Test: Benchmark Destroy Env / build (push) Has been cancelled
Util: Update Node Popularity / update-popularity (push) Has been cancelled
Test: E2E Coverage Weekly / Coverage Tests (push) Has been cancelled
first commit
2026-03-17 16:22:57 +03:30

2.7 KiB

Enforce valid credential documentationUrl format (URL or lowercase alphanumeric slug) (@n8n/community-nodes/credential-documentation-url)

💼 This rule is enabled in the following configs: recommended, ☑️ recommendedWithoutN8nCloudSupport.

Options

Name Description Type
allowSlugs Whether to allow lowercase alphanumeric slugs with slashes Boolean
allowUrls Whether to allow valid URLs Boolean

Rule Details

Ensures that credential documentationUrl values are in a valid format. For community packages, this should always be a complete URL to your documentation.

The lowercase alphanumeric slug option (allowSlugs) is only intended for internal n8n use when referring to slugs on docs.n8n.io, and should not be used in community packages. When enabled, uppercase letters in slugs will be automatically converted to lowercase.

Examples

Incorrect

export class MyApiCredential implements ICredentialType {
  name = 'myApi';
  displayName = 'My API';
  documentationUrl = 'invalid-url-format'; // Not a valid URL
  // ...
}
export class MyApiCredential implements ICredentialType {
  name = 'myApi';
  displayName = 'My API';
  documentationUrl = 'MyApi'; // Invalid: uppercase letters (will be autofixed to 'myapi')
  // ...
}
export class MyApiCredential implements ICredentialType {
  name = 'myApi';
  displayName = 'My API';
  documentationUrl = 'my-api'; // Invalid: special characters not allowed
  // ...
}

Correct

export class MyApiCredential implements ICredentialType {
  name = 'myApi';
  displayName = 'My API';
  documentationUrl = 'https://docs.myservice.com/api-setup'; // Complete URL to documentation
  // ...
}
export class MyApiCredential implements ICredentialType {
  name = 'myApi';
  displayName = 'My API';
  documentationUrl = 'https://github.com/myuser/n8n-nodes-myapi#credentials'; // GitHub README section
  // ...
}

Configuration

By default, only URLs are allowed, which is the recommended setting for community packages.

The allowSlugs option is available for internal n8n development:

{
  "rules": {
    "@n8n/community-nodes/credential-documentation-url": [
      "error",
      {
        "allowSlugs": true
      }
    ]
  }
}

Note: Community package developers should keep the default settings and always use complete URLs for their documentation.