Configuration

workflow-lint init writes workflow-lint.config.yaml with every block commented. Without a config file, lint uses the workflow-lint:recommended preset.

extends:
  - workflow-lint:recommended

settings:
  n8nVersion: 2.38.3

departments:
  hygiene: error

rules:
  naming/external-node-name-format: off
  naming/no-default-node-name: [error, { allowTriggers: false }]

ignore:
  - "**/*.generated.json"
  - path: "workflows/vendor/**"
    reason: "vendor-shipped, regenerated on upgrade"

overrides:
  - files: ["workflows/legacy/**"]
    reason: "pre-standards, frozen until rewritten"
    departments:
      naming: off
  - workflows:
      tags: [experimental]
    rules:
      hygiene/no-placeholder-api-url: off

An explicit rule setting beats its department's setting. Overrides apply last.

Presets

PresetWhat it does
workflow-lint:recommendedRuns each rule at its own default level
workflow-lint:productionRaises n8n/valid, hygiene/no-inline-secrets and reliability/http-retry-config to error, raises reliability/webhook-input-contract to warn, and turns on reliability/error-workflow-configured
workflow-lint:strictRaises every rule to error

Pin your n8n version

Set settings.n8nVersion, or pass --n8n-version.

Suppressing a finding

n8n workflows have no comments, so directives go in a node's Notes field. They can also be the first line of a sticky note, which then covers every node inside the sticky's bounds.

workflow-lint-disable naming/no-default-node-name -- renaming next sprint
workflow-lint-disable naming, structure/merge-for-reconvergence
workflow-lint-disable-file *

Baseline

A baseline lets you adopt the linter on an existing repository without fixing everything first.

workflow-lint lint --gen-baseline    # accept what is there today
workflow-lint lint                   # from now on, only new findings fail
workflow-lint lint --ignore-baseline # see everything again

The baseline stores a count per file, node and rule. A second occurrence of an accepted rule on a new node is still reported.

Several n8n instances in one repository

When one repository holds the workflows of several instances on different n8n versions, workflow-lint fleet turns a manifest into overrides, so each directory is linted against the version it runs on.

The manifest:

{
  "n8nVersion": "2.38.3",
  "instances": [
    { "name": "dev", "directory": "dev" },
    { "name": "prod", "directory": "prod", "n8nVersion": "2.36.8" },
    { "name": "sandbox", "directory": "sandbox", "versionPolicy": "floating" }
  ]
}

The command:

workflow-lint fleet instances.json >> workflow-lint.config.yaml

What it appends:

overrides:
  - files:
      - dev/**
    reason: targets the n8n running on dev
    settings:
      n8nVersion: 2.38.3
  - files:
      - prod/**
    reason: targets the n8n running on prod
    settings:
      n8nVersion: 2.36.8