forked from github/docs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbase.js
151 lines (149 loc) · 3.37 KB
/
base.js
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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
import fs from 'fs'
import yaml from 'js-yaml'
const allowedCodeFenceLanguages = Object.keys(
yaml.load(fs.readFileSync('data/code-languages.yml', 'utf8')),
)
export const baseConfig = {
// Don't run all rules by default. This must be done first to
// enable a specific set of rules.
default: false,
'heading-increment': {
// MD001
severity: 'error',
'partial-markdown-files': true,
'yml-files': true,
},
'first-heading-h1': {
// MD002
severity: 'error',
level: 2,
'partial-markdown-files': false,
'yml-files': false,
},
'ul-style': {
// MD004
severity: 'error',
style: 'asterisk',
'partial-markdown-files': true,
'yml-files': true,
},
'no-trailing-spaces': {
// MD009
severity: 'error',
'partial-markdown-files': true,
'yml-files': true,
},
'no-reversed-links': {
// MD011
severity: 'error',
'partial-markdown-files': true,
'yml-files': true,
},
'no-multiple-blanks': {
// MD012
severity: 'error',
'partial-markdown-files': true,
'yml-files': true,
},
'commands-show-output': {
// MD014
severity: 'error',
'partial-markdown-files': true,
'yml-files': true,
},
'no-missing-space-atx': {
// MD018
severity: 'error',
'partial-markdown-files': true,
'yml-files': true,
},
'no-multiple-space-atx': {
// MD019
severity: 'error',
'partial-markdown-files': true,
'yml-files': true,
},
'blanks-around-headings': {
// MD022
severity: 'error',
'partial-markdown-files': false,
'yml-files': false,
},
'heading-start-left': {
// MD023
severity: 'error',
'partial-markdown-files': false,
'yml-files': false,
},
'no-multiple-space-blockquote': {
// MD027
severity: 'error',
'partial-markdown-files': true,
'yml-files': true,
},
'ol-prefix': {
// MD029
severity: 'error',
style: 'one',
'partial-markdown-files': true,
'yml-files': true,
},
'list-marker-space': {
// MD030
severity: 'error',
'partial-markdown-files': true,
'yml-files': true,
},
'blanks-around-fences': {
// MD031
severity: 'error',
'partial-markdown-files': true,
'yml-files': true,
},
'no-space-in-emphasis': {
// MD037
severity: 'error',
'partial-markdown-files': true,
'yml-files': true,
},
'no-space-in-links': {
// MD039
severity: 'error',
'partial-markdown-files': true,
'yml-files': true,
},
'fenced-code-language': {
// MD040
severity: 'error',
'partial-markdown-files': true,
'yml-files': true,
allowed_languages: allowedCodeFenceLanguages,
context: `When you add a fenced code block, you must specify the code language. Allowed languages are: ${allowedCodeFenceLanguages.join(', ')}. You can add allowed languages by updating data/code-languages.yml.`,
},
'no-empty-links': {
// MD042
severity: 'error',
'partial-markdown-files': true,
'yml-files': true,
},
'single-trailing-newline': {
// MD047
severity: 'error',
'partial-markdown-files': true,
'yml-files': false,
},
'emphasis-style': {
// MD049
severity: 'error',
style: 'underscore',
'partial-markdown-files': true,
'yml-files': true,
},
'strong-style': {
// MD050
severity: 'error',
style: 'asterisk',
'partial-markdown-files': true,
'yml-files': true,
},
}