Skip to content

Lint rule: required front matter fields #19

Description

@roxspring

Implement a lint rule that reports when a .md file is missing required front matter fields.

Scope

  • Configurable list of required field names (e.g. ["title", "weight"])
  • If a file has no front matter at all and required fields are configured, report a violation
  • If a file has front matter but is missing one or more required fields, report each missing field as a separate violation
  • Report file path for each violation

Example violation

guide/editor.md: missing required front matter field: 'weight'

Acceptance criteria

  • File with all required fields: no violation
  • File missing one field: one violation reported
  • File with no front matter: violation reported (when required fields are configured)
  • Empty required fields list: no violations

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions