Repository navigation
Expand file tree
/
Copy path.markdownlint-cli2.mjs
More file actions
73 lines (58 loc) · 3.17 KB
/
Copy path.markdownlint-cli2.mjs
File metadata and controls
73 lines (58 loc) · 3.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
/*!
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
* Licensed under the MIT License.
*/
// markdownlint-cli2 configuration for the `docs` workspace.
//
// See https://github.com/DavidAnson/markdownlint-cli2#configuration for the schema and
// https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md for the rules.
import relativeLinksRule from "markdownlint-rule-relative-links";
export default {
config: {
// Enable markdownlint's default rule set. See the full list of rules:
// https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md
"default": true,
// first-line-heading (MD041): Every document must begin with a top-level heading (its title).
// Combined with single-title (MD025) below, this enforces exactly one H1 per document.
// https://github.com/DavidAnson/markdownlint/blob/main/doc/md041.md
"first-line-heading": true,
// Prose is not hard-wrapped; line length is enforced by Prettier where applicable.
// https://github.com/DavidAnson/markdownlint/blob/main/doc/md013.md
"line-length": false,
// HTML is permitted in Markdown (used for anchors, details/summary, etc.).
// https://github.com/DavidAnson/markdownlint/blob/main/doc/md033.md
"no-inline-html": false,
// Allow up to two consecutive blank lines.
// https://github.com/DavidAnson/markdownlint/blob/main/doc/md012.md
"no-multiple-blanks": { maximum: 2 },
// ul-indent (MD007): List indentation is owned by Prettier, which aligns nested list
// content with the parent marker. Leaving this enabled conflicts with Prettier's output.
// https://github.com/DavidAnson/markdownlint/blob/main/doc/md007.md
"ul-indent": false,
// no-hard-tabs (MD010): Hard tabs — the repo uses tabs for indentation.
// https://github.com/DavidAnson/markdownlint/blob/main/doc/md010.md
"no-hard-tabs": false,
// no-duplicate-heading (MD024): Allow identical heading text under different parents
// (e.g. repeated "Example" / "Guidance" sections). Only flag duplicate sibling headings.
// https://github.com/DavidAnson/markdownlint/blob/main/doc/md024.md
"no-duplicate-heading": { siblings_only: true },
// single-title (MD025): Enforce a single top-level heading (title) per document.
// https://github.com/DavidAnson/markdownlint/blob/main/doc/md025.md
"single-title": true,
// no-trailing-punctuation (MD026): Trailing punctuation in heading — allowed.
// https://github.com/DavidAnson/markdownlint/blob/main/doc/md026.md
"no-trailing-punctuation": false,
// no-blanks-blockquote (MD028): Blank line inside blockquote — allowed.
// https://github.com/DavidAnson/markdownlint/blob/main/doc/md028.md
"no-blanks-blockquote": false,
// relative-links (custom rule): flag relative file/image links that do not resolve on
// disk, including invalid heading fragments in cross-file links. External URLs and
// absolute paths are ignored.
// https://github.com/theoludwig/markdownlint-rule-relative-links
"relative-links": true,
},
// Custom rules loaded in addition to markdownlint's built-in rules.
customRules: [relativeLinksRule],
// Glob patterns ignored by markdownlint within this workspace.
ignores: ["**/node_modules/**"],
};