-
-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0cfb7d0
commit 2d718f4
Showing
21 changed files
with
198 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
dir1/viewme.md:5 MD012/no-multiple-blanks Multiple consecutive blank lines [Expected: 1; Actual: 2] | ||
dir1/viewme.md:6 MD025/single-title/single-h1 Multiple top-level headings in the same document [Context: "# Description"] | ||
dir2/viewme.md:6 MD025/single-title/single-h1 Multiple top-level headings in the same document [Context: "# Description"] | ||
viewme.md:5 MD012/no-multiple-blanks Multiple consecutive blank lines [Expected: 1; Actual: 2] | ||
viewme.md:6 MD025/single-title/single-h1 Multiple top-level headings in the same document [Context: "# Description"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
markdownlint-cli2-config vX.Y.Z (markdownlint vX.Y.Z) | ||
Finding: **/*.md | ||
Linting: 3 file(s) | ||
Summary: 5 error(s) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
markdownlint-cli2-config vX.Y.Z (markdownlint vX.Y.Z) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
dir1/viewme.md:5 MD012/no-multiple-blanks Multiple consecutive blank lines [Expected: 1; Actual: 2] | ||
dir1/viewme.md:6 MD025/single-title/single-h1 Multiple top-level headings in the same document [Context: "# Description"] | ||
dir2/viewme.md:6 MD025/single-title/single-h1 Multiple top-level headings in the same document [Context: "# Description"] | ||
viewme.md:5 MD012/no-multiple-blanks Multiple consecutive blank lines [Expected: 1; Actual: 2] | ||
viewme.md:6 MD025/single-title/single-h1 Multiple top-level headings in the same document [Context: "# Description"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
markdownlint-cli2-config vX.Y.Z (markdownlint vX.Y.Z) | ||
Finding: **/*.md | ||
Linting: 3 file(s) | ||
Summary: 5 error(s) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// @ts-check | ||
|
||
"use strict"; | ||
|
||
module.exports = { | ||
"config": { | ||
"no-trailing-spaces": false, | ||
"no-multiple-space-atx": false, | ||
"single-trailing-newline": false | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"config": { | ||
"no-trailing-spaces": false, | ||
"no-multiple-space-atx": false, | ||
"single-trailing-newline": false | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
config: | ||
no-trailing-spaces: false | ||
no-multiple-space-atx: false | ||
single-trailing-newline: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
// @ts-check | ||
|
||
"use strict"; | ||
|
||
module.exports = { | ||
"no-trailing-spaces": false, | ||
"no-multiple-space-atx": false, | ||
"single-trailing-newline": false | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"no-trailing-spaces": false, | ||
"no-multiple-space-atx": false, | ||
"single-trailing-newline": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"no-trailing-spaces": false, | ||
"no-multiple-space-atx": false, | ||
"single-trailing-newline": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
no-trailing-spaces: false | ||
no-multiple-space-atx: false | ||
single-trailing-newline: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
no-trailing-spaces: false | ||
no-multiple-space-atx: false | ||
single-trailing-newline: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"config": { | ||
"no-trailing-spaces": false, | ||
"no-multiple-space-atx": false, | ||
"single-trailing-newline": false | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Title | ||
|
||
> Tagline | ||
|
||
# Description | ||
|
||
Text text text | ||
Text text text | ||
Text text text | ||
|
||
## Summary | ||
|
||
Text text text |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"config": { | ||
"no-trailing-spaces": false, | ||
"no-multiple-blanks": false, | ||
"no-multiple-space-atx": false, | ||
"single-trailing-newline": false | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Title | ||
|
||
> Tagline | ||
|
||
# Description | ||
|
||
Text text text | ||
Text text text | ||
Text text text | ||
|
||
## Summary | ||
|
||
Text text text |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Title | ||
|
||
> Tagline | ||
|
||
# Description | ||
|
||
Text text text | ||
Text text text | ||
Text text text | ||
|
||
## Summary | ||
|
||
Text text text |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
markdownlint-cli2-config vX.Y.Z (markdownlint vX.Y.Z) | ||
https://github.com/DavidAnson/markdownlint-cli2 | ||
|
||
Syntax: markdownlint-cli2 glob0 [glob1] [...] [globN] | ||
markdownlint-cli2-fix glob0 [glob1] [...] [globN] | ||
markdownlint-cli2-config config-file glob0 [glob1] [...] [globN] | ||
|
||
Glob expressions (from the globby library): | ||
- * matches any number of characters, but not / | ||
- ? matches a single character, but not / | ||
- ** matches any number of characters, including / | ||
- {} allows for a comma-separated list of "or" expressions | ||
- ! or # at the beginning of a pattern negate the match | ||
- : at the beginning identifies a literal file path | ||
|
||
Dot-only glob: | ||
- The command "markdownlint-cli2 ." would lint every file in the current directory tree which is probably not intended | ||
- Instead, it is mapped to "markdownlint-cli2 *.{md,markdown}" which lints all Markdown files in the current directory | ||
- To lint every file in the current directory tree, the command "markdownlint-cli2 **" can be used instead | ||
|
||
Configuration via: | ||
- .markdownlint-cli2.jsonc | ||
- .markdownlint-cli2.yaml | ||
- .markdownlint-cli2.js | ||
- .markdownlint.jsonc or .markdownlint.json | ||
- .markdownlint.yaml or .markdownlint.yml | ||
- .markdownlint.js | ||
|
||
Cross-platform compatibility: | ||
- UNIX and Windows shells expand globs according to different rules; quoting arguments is recommended | ||
- Some Windows shells don't handle single-quoted (') arguments well; double-quote (") is recommended | ||
- Shells that expand globs do not support negated patterns (!node_modules); quoting is required here | ||
- Some UNIX shells parse exclamation (!) in double-quotes; hashtag (#) is recommended in these cases | ||
- The path separator is forward slash (/) on all platforms; backslash (\) is automatically converted | ||
|
||
The most compatible syntax for cross-platform support: | ||
$ markdownlint-cli2 "**/*.md" "#node_modules" |
2d718f4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might want to look at the snapshot testing in Ava https://github.com/avajs/ava/blob/main/docs/04-snapshot-testing.md
2d718f4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nschonni Oooh!! I like that. My recent change to JSON for these tests makes it even easier to apply. (Tho I think the RegExp exception needs to remain.) I’ll play with this after the current set of changes. Thanks!!
2d718f4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nschonni It's a great improvement, thank you for the suggestion! I give up a tiny bit of control, lose the guarantee that each scenario is identical across all three cases, and lock myself into ava a little more - but the overall simplification seems compelling.
2d718f4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I had been playing with the Jest version in htmlhint/HTMLHint#823
Generally, I found testing CLIs with these tools is generally painful 😆
2d718f4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI, the example output section seems empty: https://github.com/htmlhint/HTMLHint#-example-output