-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.markdownlint.jsonc
83 lines (83 loc) · 2.67 KB
/
.markdownlint.jsonc
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
74
75
76
77
78
79
80
81
82
83
// This file defines our configuration for Markdownlint. See
// https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md
// for more details on each rule.
// Based upon https://github.com/mdn/content/blob/main/.markdownlint.jsonc
{
"default": true,
// Allow arbitrary line length
//
// Reason: We apply the one-sentence-per-line rule. A sentence may get longer than 80 characters, especially if links are contained.
//
// Details: https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md#md013---line-length
"MD013": false,
// Allow duplicate headings
//
// Reasons:
//
// - The chosen option of an ADR is considerably often used as title of the ADR. Thus, that title repeats.
// - Markdown lint should support the user and not annoy them.
//
// Details: https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md#md024---multiple-headings-with-the-same-content
"MD024": false,
// Allow <kbd> elements
//
// Reason: We use <kbd> elements to mark up keyboard shortcuts.
//
// Details: https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md#md033---inline-html
"MD033": {
"allowed_elements": ["kbd", "details", "summary"],
},
// https://github.com/OnkarRuikar/markdownlint-rule-search-replace
"search-replace": {
"rules": [
{
"name": "curly-double-quotes",
"message": "Don't use curly double quotes",
"searchPattern": "/“|”/g",
"replace": "\"",
"searchScope": "text",
},
{
"name": "curly-single-quotes",
"message": "Don't use curly single quotes",
"searchPattern": "/‘|’/g",
"replace": "'",
"searchScope": "text",
},
{
"name": "nbsp",
"message": "Don't use no-break spaces",
"searchPattern": "/ /g",
"replace": " ",
"searchScope": "all",
},
{
"name": "m-dash",
"message": "Don't use '--'. Use m-dash — instead",
"search": " -- ",
"replace": " — ",
"searchScope": "text",
},
{
"name": "trailing-spaces",
"message": "Avoid trailing spaces",
"searchPattern": "/ +$/gm",
"replace": "",
"searchScope": "all",
},
{
"name": "double-spaces",
"message": "Avoid double spaces",
"searchPattern": "/([^\\s>]) ([^\\s|])/g",
"replace": "$1 $2",
"searchScope": "text",
},
{
"name": "un-closed-md-link",
"message": "Missing closing bracket ')'",
"searchPattern": "/(\\[[^\\]]*?\\]\\(([^\\)\\n]|\\([^\\)\\n]\\)|\\s[\"'])+?)(\\n|\\s|[,:][\\s\\n])/gm",
"searchScope": "text",
},
],
},
}