Skip to content

Commit

Permalink
chore: add --help to help output
Browse files Browse the repository at this point in the history
also reverts some conditional changes and suppresses an eslint rule
  • Loading branch information
boneskull committed Dec 17, 2023
1 parent 427aaba commit 5bedd68
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions markdownlint-cli2.js
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ const processArgv = (argv) => {
const showHelp = (logMessage) => {
logMessage(`https://github.com/DavidAnson/markdownlint-cli2
Syntax: markdownlint-cli2 glob0 [glob1] [...] [globN] [--config file] [--fix]
Syntax: markdownlint-cli2 glob0 [glob1] [...] [globN] [--config file] [--fix] [--help]
Glob expressions (from the globby library):
- * matches any number of characters, but not /
Expand Down Expand Up @@ -918,16 +918,14 @@ const main = async (params) => {
if (configPath === null) {
configPath = arg;
return false;
}
if (arg === "--config") {
// eslint-disable-next-line unicorn/prefer-switch
} else if (arg === "--config") {
configPath = null;
return false;
}
if (arg === "--fix") {
} else if (arg === "--fix") {
fixDefault = true;
return false;
}
if (arg === '--help') {
} else if (arg === '--help') {
shouldShowHelp = true;
return false;
}
Expand Down

0 comments on commit 5bedd68

Please sign in to comment.