|
| 1 | +markdownlint-cli2-config vX.Y.Z (markdownlint vX.Y.Z) |
| 2 | +https://github.com/DavidAnson/markdownlint-cli2 |
| 3 | + |
| 4 | +Syntax: markdownlint-cli2 glob0 [glob1] [...] [globN] |
| 5 | + markdownlint-cli2-fix glob0 [glob1] [...] [globN] |
| 6 | + markdownlint-cli2-config config-file glob0 [glob1] [...] [globN] |
| 7 | + |
| 8 | +Glob expressions (from the globby library): |
| 9 | +- * matches any number of characters, but not / |
| 10 | +- ? matches a single character, but not / |
| 11 | +- ** matches any number of characters, including / |
| 12 | +- {} allows for a comma-separated list of "or" expressions |
| 13 | +- ! or # at the beginning of a pattern negate the match |
| 14 | +- : at the beginning identifies a literal file path |
| 15 | + |
| 16 | +Dot-only glob: |
| 17 | +- The command "markdownlint-cli2 ." would lint every file in the current directory tree which is probably not intended |
| 18 | +- Instead, it is mapped to "markdownlint-cli2 *.{md,markdown}" which lints all Markdown files in the current directory |
| 19 | +- To lint every file in the current directory tree, the command "markdownlint-cli2 **" can be used instead |
| 20 | + |
| 21 | +Configuration via: |
| 22 | +- .markdownlint-cli2.jsonc |
| 23 | +- .markdownlint-cli2.yaml |
| 24 | +- .markdownlint-cli2.js |
| 25 | +- .markdownlint.jsonc or .markdownlint.json |
| 26 | +- .markdownlint.yaml or .markdownlint.yml |
| 27 | +- .markdownlint.js |
| 28 | + |
| 29 | +Cross-platform compatibility: |
| 30 | +- UNIX and Windows shells expand globs according to different rules; quoting arguments is recommended |
| 31 | +- Some Windows shells don't handle single-quoted (') arguments well; double-quote (") is recommended |
| 32 | +- Shells that expand globs do not support negated patterns (!node_modules); quoting is required here |
| 33 | +- Some UNIX shells parse exclamation (!) in double-quotes; hashtag (#) is recommended in these cases |
| 34 | +- The path separator is forward slash (/) on all platforms; backslash (\) is automatically converted |
| 35 | + |
| 36 | +The most compatible syntax for cross-platform support: |
| 37 | +$ markdownlint-cli2 "**/*.md" "#node_modules" |
0 commit comments