mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-09-22 05:40:48 +02:00
Add various Markdown lists as formatted by Prettier with the default --tab-width of 2 and the not uncommon alternate of 4, update Prettier.md with the relevant configuration (produced using v2.8.1 of https://prettier.io/playground/) (refs #652).
This commit is contained in:
parent
21e27a4b63
commit
cb16438a41
5 changed files with 180 additions and 7 deletions
|
@ -12,17 +12,16 @@ Other scenarios are documented below.
|
||||||
|
|
||||||
The default settings of `markdownlint` and `Prettier` are compatible and don't
|
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
|
result in any linting violations. If `Prettier` is used with `--tab-width` set
|
||||||
to `4`, the following `markdownlint` configuration can be used:
|
to `4` (vs. `2`), the following `markdownlint` configuration can be used:
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"MD007": {
|
"list-marker-space": {
|
||||||
"indent": 4
|
|
||||||
},
|
|
||||||
"MD030": {
|
|
||||||
"ul_single": 3,
|
|
||||||
"ul_multi": 3,
|
"ul_multi": 3,
|
||||||
"ol_multi": 2
|
"ul_single": 3
|
||||||
|
},
|
||||||
|
"ul-indent": {
|
||||||
|
"indent": 4
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
33
test/prettier-tab-width-2-default.md
Normal file
33
test/prettier-tab-width-2-default.md
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
# Prettier `--tab-width=2` (Default)
|
||||||
|
|
||||||
|
Text
|
||||||
|
|
||||||
|
- Item
|
||||||
|
- Item
|
||||||
|
- Item
|
||||||
|
|
||||||
|
Text
|
||||||
|
|
||||||
|
- Item
|
||||||
|
- Item
|
||||||
|
- Item
|
||||||
|
- Item
|
||||||
|
- Item
|
||||||
|
- Item
|
||||||
|
|
||||||
|
Text
|
||||||
|
|
||||||
|
1. Item
|
||||||
|
1. Item
|
||||||
|
1. Item
|
||||||
|
|
||||||
|
Text
|
||||||
|
|
||||||
|
1. Item
|
||||||
|
2. Item
|
||||||
|
1. Item
|
||||||
|
2. Item
|
||||||
|
1. Item
|
||||||
|
2. Item
|
||||||
|
|
||||||
|
Text
|
45
test/prettier-tab-width-4.md
Normal file
45
test/prettier-tab-width-4.md
Normal file
|
@ -0,0 +1,45 @@
|
||||||
|
# Prettier `--tab-width==4`
|
||||||
|
|
||||||
|
Text
|
||||||
|
|
||||||
|
- Item
|
||||||
|
- Item
|
||||||
|
- Item
|
||||||
|
|
||||||
|
Text
|
||||||
|
|
||||||
|
- Item
|
||||||
|
- Item
|
||||||
|
- Item
|
||||||
|
- Item
|
||||||
|
- Item
|
||||||
|
- Item
|
||||||
|
|
||||||
|
Text
|
||||||
|
|
||||||
|
1. Item
|
||||||
|
1. Item
|
||||||
|
1. Item
|
||||||
|
|
||||||
|
Text
|
||||||
|
|
||||||
|
1. Item
|
||||||
|
2. Item
|
||||||
|
1. Item
|
||||||
|
2. Item
|
||||||
|
1. Item
|
||||||
|
2. Item
|
||||||
|
|
||||||
|
Text
|
||||||
|
|
||||||
|
<!-- markdownlint-configure-file
|
||||||
|
{
|
||||||
|
"list-marker-space": {
|
||||||
|
"ul_multi": 3,
|
||||||
|
"ul_single": 3
|
||||||
|
},
|
||||||
|
"ul-indent": {
|
||||||
|
"indent": 4
|
||||||
|
}
|
||||||
|
}
|
||||||
|
-->
|
|
@ -32816,6 +32816,102 @@ Generated by [AVA](https://avajs.dev).
|
||||||
`,
|
`,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
## prettier-tab-width-2-default.md
|
||||||
|
|
||||||
|
> Snapshot 1
|
||||||
|
|
||||||
|
{
|
||||||
|
errors: [],
|
||||||
|
fixed: `# Prettier \`--tab-width=2\` (Default)␊
|
||||||
|
␊
|
||||||
|
Text␊
|
||||||
|
␊
|
||||||
|
- Item␊
|
||||||
|
- Item␊
|
||||||
|
- Item␊
|
||||||
|
␊
|
||||||
|
Text␊
|
||||||
|
␊
|
||||||
|
- Item␊
|
||||||
|
- Item␊
|
||||||
|
- Item␊
|
||||||
|
- Item␊
|
||||||
|
- Item␊
|
||||||
|
- Item␊
|
||||||
|
␊
|
||||||
|
Text␊
|
||||||
|
␊
|
||||||
|
1. Item␊
|
||||||
|
1. Item␊
|
||||||
|
1. Item␊
|
||||||
|
␊
|
||||||
|
Text␊
|
||||||
|
␊
|
||||||
|
1. Item␊
|
||||||
|
2. Item␊
|
||||||
|
1. Item␊
|
||||||
|
2. Item␊
|
||||||
|
1. Item␊
|
||||||
|
2. Item␊
|
||||||
|
␊
|
||||||
|
Text␊
|
||||||
|
`,
|
||||||
|
}
|
||||||
|
|
||||||
|
## prettier-tab-width-4.md
|
||||||
|
|
||||||
|
> Snapshot 1
|
||||||
|
|
||||||
|
{
|
||||||
|
errors: [],
|
||||||
|
fixed: `# Prettier \`--tab-width==4\`␊
|
||||||
|
␊
|
||||||
|
Text␊
|
||||||
|
␊
|
||||||
|
- Item␊
|
||||||
|
- Item␊
|
||||||
|
- Item␊
|
||||||
|
␊
|
||||||
|
Text␊
|
||||||
|
␊
|
||||||
|
- Item␊
|
||||||
|
- Item␊
|
||||||
|
- Item␊
|
||||||
|
- Item␊
|
||||||
|
- Item␊
|
||||||
|
- Item␊
|
||||||
|
␊
|
||||||
|
Text␊
|
||||||
|
␊
|
||||||
|
1. Item␊
|
||||||
|
1. Item␊
|
||||||
|
1. Item␊
|
||||||
|
␊
|
||||||
|
Text␊
|
||||||
|
␊
|
||||||
|
1. Item␊
|
||||||
|
2. Item␊
|
||||||
|
1. Item␊
|
||||||
|
2. Item␊
|
||||||
|
1. Item␊
|
||||||
|
2. Item␊
|
||||||
|
␊
|
||||||
|
Text␊
|
||||||
|
␊
|
||||||
|
<!-- markdownlint-configure-file␊
|
||||||
|
{␊
|
||||||
|
"list-marker-space": {␊
|
||||||
|
"ul_multi": 3,␊
|
||||||
|
"ul_single": 3␊
|
||||||
|
},␊
|
||||||
|
"ul-indent": {␊
|
||||||
|
"indent": 4␊
|
||||||
|
}␊
|
||||||
|
}␊
|
||||||
|
-->␊
|
||||||
|
`,
|
||||||
|
}
|
||||||
|
|
||||||
## proper-names-alternate.md
|
## proper-names-alternate.md
|
||||||
|
|
||||||
> Snapshot 1
|
> Snapshot 1
|
||||||
|
|
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue