Skip to content

Commit

Permalink
Update use of commander for breaking change in v13.0.0.
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidAnson committed Jan 2, 2025
1 parent df590fd commit e9435dd
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 22 deletions.
43 changes: 23 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,26 +21,29 @@ brew install markdownlint-cli
```bash
markdownlint --help

Usage: markdownlint [options] <files|directories|globs>

MarkdownLint Command Line Interface

Options:
-V, --version output the version number
-c, --config <configFile> configuration file (JSON, JSONC, JS, YAML, or TOML)
--configPointer <pointer> JSON Pointer to object within configuration file (default: "")
-d, --dot include files/folders with a dot (for example `.github`)
-f, --fix fix basic errors (does not work with STDIN)
-i, --ignore <file|directory|glob> file(s) to ignore/exclude (default: [])
-j, --json write issues in json format
-o, --output <outputFile> write issues to file (no console)
-p, --ignore-path <file> path to file with ignore pattern(s)
-q, --quiet do not write issues to STDOUT
-r, --rules <file|directory|glob|package> include custom rule files (default: [])
-s, --stdin read from STDIN (does not work with files)
--enable <rules...> Enable certain rules, e.g. --enable MD013 MD041 --
--disable <rules...> Disable certain rules, e.g. --disable MD013 MD041 --
-h, --help display help for command
Usage: markdownlint [options] [files|directories|globs...]

MarkdownLint Command Line Interface

Arguments:
files|directories|globs files, directories, and/or globs to lint

Options:
-V, --version output the version number
-c, --config <configFile> configuration file (JSON, JSONC, JS, YAML, or TOML)
--configPointer <pointer> JSON Pointer to object within configuration file (default: "")
-d, --dot include files/folders with a dot (for example `.github`)
-f, --fix fix basic errors (does not work with STDIN)
-i, --ignore <file|directory|glob> file(s) to ignore/exclude (default: [])
-j, --json write issues in json format
-o, --output <outputFile> write issues to file (no console)
-p, --ignore-path <file> path to file with ignore pattern(s)
-q, --quiet do not write issues to STDOUT
-r, --rules <file|directory|glob|package> include custom rule files (default: [])
-s, --stdin read from STDIN (does not work with files)
--enable <rules...> Enable certain rules, e.g. --enable MD013 MD041 --
--disable <rules...> Disable certain rules, e.g. --disable MD013 MD041 --
-h, --help display help for command
```

Or run using [Docker](https://www.docker.com) and [GitHub Packages](https://github.com/features/packages):
Expand Down
4 changes: 2 additions & 2 deletions markdownlint.js
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,6 @@ function concatArray(item, array) {
program
.version(version)
.description(description)
.usage('[options] <files|directories|globs>')
.option('-c, --config <configFile>', 'configuration file (JSON, JSONC, JS, YAML, or TOML)')
.option('--configPointer <pointer>', 'JSON Pointer to object within configuration file', '')
.option('-d, --dot', 'include files/folders with a dot (for example `.github`)')
Expand All @@ -212,7 +211,8 @@ program
.option('-r, --rules <file|directory|glob|package>', 'include custom rule files', concatArray, [])
.option('-s, --stdin', 'read from STDIN (does not work with files)')
.option('--enable <rules...>', 'Enable certain rules, e.g. --enable MD013 MD041 --')
.option('--disable <rules...>', 'Disable certain rules, e.g. --disable MD013 MD041 --');
.option('--disable <rules...>', 'Disable certain rules, e.g. --disable MD013 MD041 --')
.argument('[files|directories|globs...]', 'files, directories, and/or globs to lint');

program.parse(process.argv);

Expand Down

0 comments on commit e9435dd

Please sign in to comment.