generated from mdn/project-template
-
Notifications
You must be signed in to change notification settings - Fork 40
/
.markdownlint-cli2.jsonc
94 lines (92 loc) · 2.48 KB
/
.markdownlint-cli2.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
84
85
86
87
88
89
90
91
92
93
94
// This file defines our configuration for Markdownlint. See
// https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md
// for more details on each rule.
{
"config": {
"default": true,
"no-inline-html": {
"allowed_elements": ["scrim-inline"]
},
"ul-style": {
"style": "dash"
},
"ul-indent": {
"indent": 2
},
"no-hard-tabs": {
"spaces_per_tab": 2
},
"line-length": false,
"link-fragments": false,
// Force ordered numbering to catch accidental list ending from indenting
"ol-prefix": {
"style": "ordered"
},
"code-block-style": {
"style": "fenced"
},
"emphasis-style": {
"style": "underscore"
},
"strong-style": {
"style": "asterisk"
},
"first-line-heading": false,
// 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": "/\u00A0/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": "incorrect-spelling",
"message": "Incorrect spelling",
"searchPattern": ["/e-mail/ig", "/(w)eb site/ig"],
"replace": ["email", "$1ebsite"],
"searchScope": "all"
}
]
}
},
"customRules": ["markdownlint-rule-search-replace"],
"ignores": ["node_modules", ".git", ".github", "tests"]
}