hs-markdownlint-cli

0.1.2 • Public • Published

markdownlint-cli Travis CI Build Status AppVeyor CI Build Status

Command Line Interface for MarkdownLint

Installation

npm install -g markdownlint-cli

Usage

$ markdownlint --help
 
  Usage: markdownlint [options] <files|directories|globs>
 
  MarkdownLint Command Line Interface
 
  Options:
 
    -h, --help                                  output usage information
    -V, --version                               output the version number
    -s, --stdin                                 read from STDIN (no files)
    -o, --output [outputFile]                   write issues to file (no console)
    -c, --config [configFile]                   configuration file (JSON or YAML)
    -i, --ignore [file|directory|glob]          files to ignore/exclude
    -r, --rules  [file|directory|glob|package]  custom rule files

Configuration

markdownlint-cli reuses the rules from markdownlint package.

Configuration is stored in JSON, YAML or INI files in the same config format.

The example of configuration file:

{
  "default": true,
  "MD003": { "style": "atx_closed" },
  "MD007": { "indent": 4 },
  "no-hard-tabs": false,
  "whitespace": false
}

See test configuration file or style folder for more examples.

CLI argument --config is not mandatory. If it is not provided, markdownlint-cli looks for file .markdownlint.json/.markdownlint.yaml/.markdownlint.yml in current folder, or for file .markdownlintrc in current or all upper folders. The algorithm is described in details on rc package page. If --config argument is provided, the file must be valid JSON or YAML.

Related

License

MIT © Igor Shubovych

Package Sidebar

Install

npm i hs-markdownlint-cli

Weekly Downloads

4

Version

0.1.2

License

MIT

Unpacked Size

13.7 kB

Total Files

5

Last publish

Collaborators

  • quentinchen