{"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"markdown-and-prose-linting","__idx":0},"children":["Markdown and prose linting"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Recheck is the Markdown linter built into Redocly CLI."," ","The ",{"$$mdtype":"Tag","name":"Link","attributes":{"href":"/docs/cli/v2/commands/recheck"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["recheck"]}," command"]}," reads the Markdown files in a folder and reports problems with their structure, their prose, and their Markdoc tags."," ","It replaces a separate markdownlint and Vale setup with one tool and one configuration file."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Recheck has two kinds of rules:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Markdown rules"]}," check structure and formatting: heading levels, list indentation, blank lines, link syntax, tables, and code fences."," ","They port every built-in markdownlint rule, and most of them fix the file for you with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--fix"]},"."," ","See ",{"$$mdtype":"Tag","name":"Link","attributes":{"href":"/docs/cli/v2/recheck/rules"},"children":["Markdown rules"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Prose rules"]}," check the words: banned terms, spelling, repeated words, heading capitalization, sentence length, and readability."," ","Each prose rule is an assertion such as ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["swap"]}," or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["pattern"]}," applied to a scope such as ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["heading"]}," or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sentence"]},"."," ","See ",{"$$mdtype":"Tag","name":"Link","attributes":{"href":"/docs/cli/v2/recheck/assertions"},"children":["Prose rules"]},"."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Ready-made ",{"$$mdtype":"Tag","name":"Link","attributes":{"href":"/docs/cli/v2/recheck/presets"},"children":["presets"]}," bundle these rules: a markdownlint-compatible structural set, a prose starter, Markdoc tag checks, and rule sets adapted from the Google and Microsoft style guides."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"quickstart","__idx":1},"children":["Quickstart"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Run the command with no configuration to lint a folder with the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["recheck/markdown"]}," preset:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"npx @redocly/cli@latest recheck docs\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The report lists each finding with the rule name, the file and line, and a message."," ","Findings marked ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["[fixable]"]}," can be repaired automatically:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"npx @redocly/cli@latest recheck docs --fix\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["To keep the configuration, create a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["redocly.yaml"]}," file and add a preset to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["extends"]},":"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"yaml","header":{"controls":{"copy":{}}},"source":"extends:\n  - recheck/markdown\n","lang":"yaml"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["If ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["redocly.yaml"]}," already exists, add the preset next to your API ruleset:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"yaml","header":{"controls":{"copy":{}}},"source":"extends:\n  - recommended\n  - recheck/markdown\n","lang":"yaml"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["lint"]}," command ignores Recheck presets, and the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["recheck"]}," command ignores API rulesets, so the two live side by side in one file."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"configure-rules","__idx":2},"children":["Configure rules"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Presets go in the root ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["extends"]},"."," ","Adjustments go in the ",{"$$mdtype":"Tag","name":"Link","attributes":{"href":"/docs/cli/v2/configuration/reference/recheck"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["recheck"]}," block"]},"."," ","Each preset rule has a key such as ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["recheck/line-length"]}," or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["google/no-via"]},", and the block sets a severity or options for that key:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"yaml","header":{"controls":{"copy":{}}},"source":"extends:\n  - recheck/markdown\n  - recheck/prose\nrecheck:\n  excludes:\n    - CHANGELOG.md\n  rules:\n    recheck/line-length: off\n    recheck/no-duplicate-heading:\n      severity: warn\n      assertions:\n        no-duplicate-heading:\n          siblingsOnly: true\n","lang":"yaml"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The block can also declare new rules."," ","A new rule names an assertion, and for a prose assertion, a message:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"yaml","header":{"controls":{"copy":{}}},"source":"recheck:\n  rules:\n    recheck/no-via:\n      severity: warn\n      scope: sentence\n      message: 'Use \"through\" or \"by using\" instead of \"via\".'\n      assertions:\n        pattern:\n          ignoreCase: true\n          tokens:\n            - '\\bvia\\b'\n","lang":"yaml"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Read ",{"$$mdtype":"Tag","name":"Link","attributes":{"href":"/docs/cli/v2/recheck/assertions"},"children":["Prose rules"]}," for every assertion and its options."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"severity-levels","__idx":3},"children":["Severity levels"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Severity"},"children":["Severity"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Effect"},"children":["Effect"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["error"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Reported, and the command exits with code 1."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["warn"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Reported. The command still exits with code 0."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["info"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Reported as an informational message. The exit code stays 0."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["off"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The rule does not run."]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"fix-findings-automatically","__idx":4},"children":["Fix findings automatically"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["A rule is fixable when its assertion knows how to repair the text."," ","Most Markdown rules are fixable, and so are the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["swap"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["repetition"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["consistency"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["capitalization"]},", and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["semantic-line-breaks"]}," assertions."," ","Set ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["fix: false"]}," on a rule to keep it detection-only."," ","The style guide presets set ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["fix: false"]}," on every rule, because automatic word swaps changed the meaning of correct text in testing."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"adopt-recheck-on-an-existing-project","__idx":5},"children":["Adopt Recheck on an existing project"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["A large documentation set rarely passes a new linter on the first run."," ","Three tools make adoption gradual:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Work rule by rule"]}," with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--rule <name>"]}," to see one rule's findings, then fix or configure that rule before moving to the next."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Measure before deciding"]}," with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--stats"]}," or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--summary=json"]},", which count findings per rule."," ","Set a noisy rule to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["warn"]}," or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["off"]}," from the counts, not from taste."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Record a baseline"]}," with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--generate-baseline"]},"."," ","The baseline records today's errors, and later runs fail only on new ones."," ","See ",{"$$mdtype":"Tag","name":"Link","attributes":{"href":"/docs/cli/v2/recheck/suppress-findings#use-a-baseline"},"children":["Suppress findings"]},"."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["For single lines or files that must stay as written, use ",{"$$mdtype":"Tag","name":"Link","attributes":{"href":"/docs/cli/v2/recheck/suppress-findings"},"children":["inline directives or exceptions"]},"."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"run-in-ci","__idx":6},"children":["Run in CI"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["github-actions"]}," format turns each finding into an annotation on the pull request:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"yaml","header":{"controls":{"copy":{}}},"source":"- name: Lint Markdown\n  run: npx @redocly/cli@latest recheck docs --format=github-actions\n","lang":"yaml"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sarif"]}," format uploads to code scanning tools, and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["json"]}," feeds your own scripts."," ","See the ",{"$$mdtype":"Tag","name":"Link","attributes":{"href":"/docs/cli/v2/commands/recheck#formats"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["recheck"]}," command"]}," for the details of each format."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"use-with-ai-assistants","__idx":7},"children":["Use with AI assistants"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Two agent skills teach an AI coding assistant to work with Recheck:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["recheck-lint"]}," runs the command on the Markdown the assistant touched, applies ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--fix"]},", and fixes the rest by hand before the change is committed."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["recheck-config"]}," writes and tunes the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["recheck"]}," block from measured counts instead of guesses."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Install them with the other Redocly CLI skills:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"npx skills add https://redocly.com\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"related-pages","__idx":8},"children":["Related pages"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"Link","attributes":{"href":"/docs/cli/v2/commands/recheck"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["recheck"]}," command"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"Link","attributes":{"href":"/docs/cli/v2/configuration/reference/recheck"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["recheck"]}," configuration reference"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"Link","attributes":{"href":"/docs/cli/v2/recheck/presets"},"children":["Presets"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"Link","attributes":{"href":"/docs/cli/v2/recheck/rules"},"children":["Markdown rules"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"Link","attributes":{"href":"/docs/cli/v2/recheck/assertions"},"children":["Prose rules"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"Link","attributes":{"href":"/docs/cli/v2/recheck/markdoc"},"children":["Markdoc tags"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"Link","attributes":{"href":"/docs/cli/v2/recheck/suppress-findings"},"children":["Suppress findings"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"Link","attributes":{"href":"/docs/cli/v2/guides/migrate-from-markdownlint"},"children":["Migrate from markdownlint and Vale"]}]}]}]},"frontmatter":{"seo":{"title":"Lint Markdown and prose with Recheck","description":"Check Markdown structure, prose style, and Markdoc tags with the redocly recheck command."}},"tagList":[],"title":"Lint Markdown and prose with Recheck","lastModified":"2026-10-05T09:58:30.000Z"}