forked from FabricMC/fabric-docs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.markdownlint-cli2.yaml
80 lines (80 loc) · 2.26 KB
/
.markdownlint-cli2.yaml
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
# Available configuration options: https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md
config:
MD003:
style: atx
MD004:
style: dash
MD007:
indent: 2
MD009:
br_spaces: 0
MD013: false
MD024:
siblings_only: true
MD025:
front_matter_title: ""
MD026:
# Allow headings to end with `!`
punctuation: ".,;:。,;:"
MD029:
style: ordered
MD033: false
MD035:
style: ---
MD044: false
MD046:
style: fenced
MD048:
style: backtick
MD049:
style: underscore
MD050:
style: asterisk
MD053: false
MD054:
# A link to [keyword][].
collapsed: false
# A link to [keyword].
# [keyword]: <https://docs.fabricmc.net/>
shortcut: false
url_inline: false
MD055:
style: leading_and_trailing
search-replace:
rules:
- name: missing-heading-anchor
message: "Add anchors to headings. Use lowercase characters, numbers and dashes"
searchPattern: "/^#+.*$(?<!\\{#[a-z0-9-]+\\})/gm"
searchScope: text
- name: no-absolute-links
message: "Don't use absolute links"
searchPattern: "/\\[.*?\\]\\(/(?!assets|public|reference).*?\\)/g"
searchScope: text
- name: no-curly-quotes
message: "Don't use curly quotes"
search: [“, ”, ‘, ’]
replace: ['"', '"', "'", "'"]
searchScope: text
- name: no-file-extension-in-links
message: "Don't add the file extension to links"
searchPattern: "/\\[(.*?)\\]\\((.*?)\\.(?:md|html)((?:#[a-z0-9-]+)?)\\)/g"
replace: "[$1]($2$3)"
searchScope: text
- name: no-multiple-spaces
message: "Don't use multiple spaces"
searchPattern: "/(?<!\\n| ) +(?! |\\|)/g"
replace: " "
searchScope: text
- name: no-punctuation-in-links
message: "Don't place punctuation inside of links"
searchPattern: "/(?<!@)\\[(.*?)([.,:;?!]+)\\]\\((.*?)\\)/g"
replace: "[$1]($3)$2"
searchScope: text
- name: no-trailing-whitespace
message: "Don't use trailing whitespace"
searchPattern: "/ +$/gm"
replace: ""
searchScope: code
customRules:
- ./node_modules/markdownlint-rule-search-replace/rule.js
- ./node_modules/markdownlint-rule-titlecase/rule.js