-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use a dedicated formatter/linter for Markdown files (#75)
* Install markdownlint-cli2 * Change indentation to 2 spaces for Markdown * Add useful VS Code settings for Markdown * Add better refs for EditorConfig options for Markdown * Avoid formatting Markdown files with Prettier * Add npm scripts to run markdownlint via CLI * Add a configuration file * Disable trailing commas in JSONC files See prettier/prettier#15956.
- Loading branch information
1 parent
74190a4
commit 8a05b6b
Showing
7 changed files
with
427 additions
and
7 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
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,48 @@ | ||
// I use the .markdownlint-cli2.jsonc configuration file because it enables auto-completion in VS Code when using the extension. More info: https://github.com/DavidAnson/markdownlint-cli2/blob/main/README.md#markdownlint-cli2jsonc. | ||
|
||
{ | ||
"globs": ["**.md"], // Lint all .md files in the current directory and its subdirectories | ||
"config": { | ||
"default": true, | ||
"code-block-style": { | ||
"style": "fenced" | ||
}, | ||
"code-fence-style": { | ||
"style": "backtick" | ||
}, | ||
"emphasis-style": { | ||
"style": "asterisk" | ||
}, | ||
"heading-style": { | ||
"style": "atx" | ||
}, | ||
"hr-style": { | ||
"style": "---" | ||
}, | ||
"line-length": false, | ||
"no-blanks-blockquote": false, // Allow consecutive blockquotes/alerts/callouts | ||
"no-duplicate-heading": { | ||
"siblings_only": true | ||
}, | ||
"no-inline-html": false, | ||
"no-trailing-punctuation": { | ||
"punctuation": ".,;:。,;:" // Allow '!' and '!' (default is ".,;:!。,;:!") | ||
}, | ||
"no-trailing-spaces": { | ||
"strict": true | ||
}, | ||
"ol-prefix": { | ||
"style": "ordered" | ||
}, | ||
"strong-style": { | ||
"style": "asterisk" | ||
}, | ||
"table-pipe-style": { | ||
"style": "leading_and_trailing" | ||
}, | ||
"ul-style": { | ||
"style": "dash" | ||
} | ||
}, | ||
"gitignore": true | ||
} |
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
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
Oops, something went wrong.