Skip to content

Linting Rules

View Markdown

Clean diagrams aren’t accidental. They’re enforced.

tlDiagram’s linting system checks every diagram for architectural anti-patterns. Run with tld plan, tld validate, or tld check. Three strictness levels. Configurable per rule.

These are heuristic checks designed to catch common issues that lead to messy, unreadable diagrams. They’re not hard rules and are constantly evolving.

Set the level globally or per-workspace:

.tld/.tld.yaml
validation:
level: 2

Override at the command line:

Terminal window
tld plan --strictness 3
tld validate --strictness 1

Some rules don’t make sense for every project. Disable them:

validation:
level: 2
allow_low_insight: true # "Low Insight Ratio" off
allow_generic_labels: true # "Generic Labels" off

Or per-repository (in multi-repo setups):

validation:
level: 2
repositories:
backend:
validation:
allow_low_insight: true

Linting warnings are advisory. They don’t block tld apply. But they appear in:

  • tld plan output
  • tld validate output
  • tld check output

A warning means “this might be a problem.” It’s your call whether to address it or acknowledge it.