Skip to content

Add deterministic MDX linter to improve docs quality and consistency#1350

Open
yasnazariel wants to merge 1 commit intobase:masterfrom
yasnazariel:patch-4
Open

Add deterministic MDX linter to improve docs quality and consistency#1350
yasnazariel wants to merge 1 commit intobase:masterfrom
yasnazariel:patch-4

Conversation

@yasnazariel
Copy link
Copy Markdown

Overview

This PR introduces a custom MDX linter to enforce consistency and catch common documentation issues before merge.

What’s included

  • Frontmatter validation (title, description)
  • Code block language enforcement
  • Internal link validation
  • Basic structure checks (headings, components)

Improvements

  • Lints only changed files by default using git diff
  • Adds file system caching for faster link validation
  • Reduces false positives in code block detection
  • Provides clear error/warning output with line references

Why this matters

This helps prevent:

  • Broken internal links
  • Missing metadata
  • Invalid MDX syntax
  • Inconsistent documentation structure

Overall, it improves documentation reliability and reduces review overhead.

Usage

node scripts/lint-mdx.js        # changed files
node scripts/lint-mdx.js all    # all docs

feat: add MDX linter

Adds a script to validate MDX files (frontmatter, code blocks, links) and improve docs consistency.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant