mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-09-22 05:40:48 +02:00
Add Prettier.md to document compatibility issues (fixes #410).
This commit is contained in:
parent
92111e09cf
commit
580e57ddee
3 changed files with 29 additions and 0 deletions
23
doc/Prettier.md
Normal file
23
doc/Prettier.md
Normal file
|
@ -0,0 +1,23 @@
|
|||
# Using markdownlint with Prettier
|
||||
|
||||
[`Prettier`](https://prettier.io) is a popular code formatter. For the most part,
|
||||
it works seamlessly with `markdownlint`. Special situations are documented
|
||||
below.
|
||||
|
||||
## List item indentation
|
||||
|
||||
The default settings of `markdownlint` and `Prettier` are compatible and don't
|
||||
result in any linting violations. If `Prettier` is used with `--tab-width` set
|
||||
to `4`, the following `markdownlint` configuration can be used:
|
||||
|
||||
```json
|
||||
{
|
||||
"MD007": {
|
||||
"indent": 4
|
||||
},
|
||||
"MD030": {
|
||||
"ul_single": 3,
|
||||
"ul_multi": 3
|
||||
}
|
||||
}
|
||||
```
|
|
@ -329,6 +329,8 @@ issue for multi-markdown parsers, which require 4-space indents. More informatio
|
|||
<https://cirosantilli.com/markdown-style-guide#indentation-of-content-inside-lists>
|
||||
and <http://support.markedapp.com/discussions/problems/21-sub-lists-not-indenting>.
|
||||
|
||||
Note: See [Prettier.md](Prettier.md) for compatibility information.
|
||||
|
||||
<a name="md009"></a>
|
||||
|
||||
## MD009 - Trailing spaces
|
||||
|
@ -1183,6 +1185,8 @@ for your selected document style.
|
|||
|
||||
Rationale: Violations of this rule can lead to improperly rendered content.
|
||||
|
||||
Note: See [Prettier.md](Prettier.md) for compatibility information.
|
||||
|
||||
<a name="md031"></a>
|
||||
|
||||
## MD031 - Fenced code blocks should be surrounded by blank lines
|
||||
|
|
|
@ -80,6 +80,7 @@ test.cb("projectFilesNoInlineConfig", (t) => {
|
|||
"README.md",
|
||||
"CONTRIBUTING.md",
|
||||
"doc/CustomRules.md",
|
||||
"doc/Prettier.md",
|
||||
"helpers/README.md"
|
||||
],
|
||||
"noInlineConfig": true,
|
||||
|
@ -94,6 +95,7 @@ test.cb("projectFilesNoInlineConfig", (t) => {
|
|||
"README.md": [],
|
||||
"CONTRIBUTING.md": [],
|
||||
"doc/CustomRules.md": [],
|
||||
"doc/Prettier.md": [],
|
||||
"helpers/README.md": []
|
||||
};
|
||||
t.deepEqual(actual, expected, "Issue(s) with project files.");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue