Skip to content

mdrefineLint and format Markdown

One configuration for checks and formatting, for GitHub, Forgejo, Gitea, Obsidian, VitePress, or any CommonMark renderer.

sh
npx mdrefine lint            # report what the rules find, without changing files
npx mdrefine format --write  # apply the fixes

format alone and format --diff preview the changes, and format --check fails a CI job on unformatted files; Getting started compares them.

mdrefine is meant to replace a general-purpose linter and formatter, such as markdownlint and Prettier, for Markdown documents. The comparison lists each of their checks with the rule that covers it and where it behaves differently.

Get started, browse the rules, or see examples of documents before and after formatting.