diff --git a/README.md b/README.md index bf21a79c..1c2b9932 100644 --- a/README.md +++ b/README.md @@ -21,26 +21,29 @@ brew install markdownlint-cli ```bash markdownlint --help - Usage: markdownlint [options] - - MarkdownLint Command Line Interface - - Options: - -V, --version output the version number - -c, --config configuration file (JSON, JSONC, JS, YAML, or TOML) - --configPointer 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(s) to ignore/exclude (default: []) - -j, --json write issues in json format - -o, --output write issues to file (no console) - -p, --ignore-path path to file with ignore pattern(s) - -q, --quiet do not write issues to STDOUT - -r, --rules include custom rule files (default: []) - -s, --stdin read from STDIN (does not work with files) - --enable Enable certain rules, e.g. --enable MD013 MD041 -- - --disable 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 configuration file (JSON, JSONC, JS, YAML, or TOML) + --configPointer 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(s) to ignore/exclude (default: []) + -j, --json write issues in json format + -o, --output write issues to file (no console) + -p, --ignore-path path to file with ignore pattern(s) + -q, --quiet do not write issues to STDOUT + -r, --rules include custom rule files (default: []) + -s, --stdin read from STDIN (does not work with files) + --enable Enable certain rules, e.g. --enable MD013 MD041 -- + --disable 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): diff --git a/markdownlint.js b/markdownlint.js index d3d9935f..7aa24a62 100755 --- a/markdownlint.js +++ b/markdownlint.js @@ -199,7 +199,6 @@ function concatArray(item, array) { program .version(version) .description(description) - .usage('[options] ') .option('-c, --config ', 'configuration file (JSON, JSONC, JS, YAML, or TOML)') .option('--configPointer ', 'JSON Pointer to object within configuration file', '') .option('-d, --dot', 'include files/folders with a dot (for example `.github`)') @@ -212,7 +211,8 @@ program .option('-r, --rules ', 'include custom rule files', concatArray, []) .option('-s, --stdin', 'read from STDIN (does not work with files)') .option('--enable ', 'Enable certain rules, e.g. --enable MD013 MD041 --') - .option('--disable ', 'Disable certain rules, e.g. --disable MD013 MD041 --'); + .option('--disable ', 'Disable certain rules, e.g. --disable MD013 MD041 --') + .argument('[files|directories|globs...]', 'files, directories, and/or globs to lint'); program.parse(process.argv); diff --git a/package-lock.json b/package-lock.json index b49ddf8e..52dbf2c7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,7 @@ "version": "0.43.0", "license": "MIT", "dependencies": { - "commander": "~12.1.0", + "commander": "~13.0.0", "glob": "~11.0.0", "ignore": "~7.0.0", "js-yaml": "~4.1.0", @@ -1946,10 +1946,9 @@ "license": "MIT" }, "node_modules/commander": { - "version": "12.1.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-12.1.0.tgz", - "integrity": "sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA==", - "license": "MIT", + "version": "13.0.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-13.0.0.tgz", + "integrity": "sha512-oPYleIY8wmTVzkvQq10AEok6YcTC4sRUBl8F9gVuwchGVUCTbl/vhLTaQqutuuySYOsu8YTgV+OxKc/8Yvx+mQ==", "engines": { "node": ">=18" } diff --git a/package.json b/package.json index c331bb0a..49d11aaf 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,7 @@ }, "homepage": "https://github.com/igorshubovych/markdownlint-cli#readme", "dependencies": { - "commander": "~12.1.0", + "commander": "~13.0.0", "glob": "~11.0.0", "ignore": "~7.0.0", "js-yaml": "~4.1.0",