### Install markdownlint-cli with npm Source: https://github.com/igorshubovych/markdownlint-cli/blob/master/README.md Install the markdownlint-cli globally using npm. ```bash npm install -g markdownlint-cli ``` -------------------------------- ### Install markdownlint-cli with Homebrew Source: https://github.com/igorshubovych/markdownlint-cli/blob/master/README.md Install the markdownlint-cli on macOS using Homebrew. ```bash brew install markdownlint-cli ``` -------------------------------- ### Lint all Markdown files in a project (Windows CMD) Source: https://github.com/igorshubovych/markdownlint-cli/blob/master/README.md Use globbing to lint all Markdown files in the current directory and its subdirectories, ignoring the 'node_modules' directory. This example is for Windows CMD. ```bash markdownlint **/*.md --ignore node_modules ``` -------------------------------- ### Basic Code Block Source: https://github.com/igorshubovych/markdownlint-cli/blob/master/test/subdir-correct/correct.md A simple code block example. ```plaintext code ``` -------------------------------- ### Lint all Markdown files in a project (Linux Bash) Source: https://github.com/igorshubovych/markdownlint-cli/blob/master/README.md Use globbing to lint all Markdown files in the current directory and its subdirectories, ignoring the 'node_modules' directory. This example is for Linux Bash, with globbing quoted. ```bash markdownlint '**/*.md' --ignore node_modules ``` -------------------------------- ### Multi-line Code Block Source: https://github.com/igorshubovych/markdownlint-cli/blob/master/test/subdir-correct/correct.md An example of a code block spanning multiple lines. ```plaintext code code ``` -------------------------------- ### Display help for markdownlint-cli Source: https://github.com/igorshubovych/markdownlint-cli/blob/master/README.md Show the help message and usage information for the markdownlint-cli. ```bash markdownlint --help ``` -------------------------------- ### Run markdownlint-cli with Docker Source: https://github.com/igorshubovych/markdownlint-cli/blob/master/README.md Execute markdownlint-cli using Docker, mounting the current directory and specifying Markdown files to lint. ```bash docker run -v $PWD:/workdir ghcr.io/igorshubovych/markdownlint-cli:latest "*.md" ``` -------------------------------- ### Sample JSON Configuration for markdownlint-cli Source: https://github.com/igorshubovych/markdownlint-cli/blob/master/README.md This JSON configuration file sets default rules, customizes specific rule styles (MD003), indentation (MD007), and disables certain rules ('no-hard-tabs', 'whitespace'). ```json { "default": true, "MD003": { "style": "atx_closed" }, "MD007": { "indent": 4 }, "no-hard-tabs": false, "whitespace": false } ``` -------------------------------- ### Code Block with Shell Prompt and Output Source: https://github.com/igorshubovych/markdownlint-cli/blob/master/test/subdir-correct/correct.md Demonstrates a code block that includes a shell prompt and its output. ```shell $ code output ``` -------------------------------- ### Enable and disable specific rules Source: https://github.com/igorshubovych/markdownlint-cli/blob/master/README.md Demonstrates how to use the --enable and --disable flags with a variadic argument, requiring '--' to separate rules from file paths. ```bash markdownlint --disable MD013 -- README.md ``` -------------------------------- ### Pre-commit Configuration for Markdownlint-CLI Source: https://github.com/igorshubovych/markdownlint-cli/blob/master/README.md Add this configuration to your .pre-commit-config.yaml to run markdownlint-cli as part of your pre-commit hooks. Ensure the 'rev' matches the desired version. ```yaml - repo: https://github.com/igorshubovych/markdownlint-cli rev: v0.49.0 hooks: - id: markdownlint ``` -------------------------------- ### Basic Code Snippet Source: https://github.com/igorshubovych/markdownlint-cli/blob/master/test/subdir-incorrect/UPPER.MD This is a basic code snippet. It is a placeholder for actual code. ```text $ code ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.