diff --git a/doc/Prettier.md b/doc/Prettier.md index abe1f07e..0ebde95d 100644 --- a/doc/Prettier.md +++ b/doc/Prettier.md @@ -12,17 +12,16 @@ Other scenarios are documented below. 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: +to `4` (vs. `2`), the following `markdownlint` configuration can be used: ```json { - "MD007": { - "indent": 4 - }, - "MD030": { - "ul_single": 3, + "list-marker-space": { "ul_multi": 3, - "ol_multi": 2 + "ul_single": 3 + }, + "ul-indent": { + "indent": 4 } } ``` diff --git a/test/prettier-tab-width-2-default.md b/test/prettier-tab-width-2-default.md new file mode 100644 index 00000000..d8e9aee7 --- /dev/null +++ b/test/prettier-tab-width-2-default.md @@ -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 diff --git a/test/prettier-tab-width-4.md b/test/prettier-tab-width-4.md new file mode 100644 index 00000000..36ca1b25 --- /dev/null +++ b/test/prettier-tab-width-4.md @@ -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 + + diff --git a/test/snapshots/markdownlint-test-scenarios.js.md b/test/snapshots/markdownlint-test-scenarios.js.md index d6b71694..f93f80f7 100644 --- a/test/snapshots/markdownlint-test-scenarios.js.md +++ b/test/snapshots/markdownlint-test-scenarios.js.md @@ -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␊ + ␊ + ␊ + `, + } + ## proper-names-alternate.md > Snapshot 1 diff --git a/test/snapshots/markdownlint-test-scenarios.js.snap b/test/snapshots/markdownlint-test-scenarios.js.snap index 0cf015e0..ffd4a809 100644 Binary files a/test/snapshots/markdownlint-test-scenarios.js.snap and b/test/snapshots/markdownlint-test-scenarios.js.snap differ