Skip to content
Esc
navigateopen⌘Jpreview
On this page

document-type-filename-invalid

Reports a direct typed-document child that does not match its Document Type filename pattern.

← All Rules

What it does

Reports a direct child of a Document Type directory when its basename does not match that type’s canonical Markdown filename pattern.

Why it matters

Canonical filenames carry the fields used to recognize and evaluate typed documents.

Examples

For the Matt Pocock Profile’s docs/adr/{{number}}-{{slug}}.md pattern:

Non-passing

docs/adr/
├── 0000-zero.md
└── one-bad-name.md

Passing

docs/adr/
└── 0001-record-the-decision.md

When it applies

This Rule belongs to the configurable document-types group. It excludes support files such as the type’s TEMPLATE.md and configured Index Documents.

References

See Presswork Configuration for filename patterns and src/document-type.ts for matching semantics.