|
2 | 2 |
|
3 | 3 | // MAIN // |
4 | 4 |
|
5 | | -var config = {}; |
6 | | -var plugins = {}; |
7 | | -var lint = {}; |
8 | | -var vlinks = {}; |
9 | | - |
10 | | -config.plugins = plugins; |
11 | | - |
12 | | -plugins[ 'lint' ] = lint; |
13 | | -plugins[ 'validate-links' ] = vlinks; |
14 | | - |
15 | | -// Reset all rules: |
16 | | -lint[ 'reset' ] = true; |
17 | | - |
18 | | -// Ensure consistent blockquote-indentation: |
19 | | -lint[ 'blockquote-indentation' ] = [ 'error', 2 ]; // characters |
20 | | - |
21 | | -// Define the checkbox character style: |
22 | | -lint[ 'checkbox-character-style' ] = [ 'error', { |
23 | | - 'checked': 'x', |
24 | | - 'unchecked': ' ' |
25 | | -}]; |
26 | | - |
27 | | -// Prevent checkboxes being followed by too much white-space: |
28 | | -lint[ 'checkbox-content-indent' ] = [ 'error' ]; |
29 | | - |
30 | | -// Require `fenced` code block style: |
31 | | -lint[ 'code-block-style' ] = [ 'error', 'fenced' ]; |
32 | | - |
33 | | -// Require lowercased definition labels: |
34 | | -lint[ 'definition-case' ] = [ 'error' ]; |
35 | | - |
36 | | -// Prevent consecutive whitespace in a definition: |
37 | | -lint[ 'definition-spacing' ] = [ 'error' ]; |
38 | | - |
39 | | -// Define the emphasis marker: |
40 | | -lint[ 'emphasis-marker' ] = [ 'error', '*' ]; |
41 | | - |
42 | | -// Require fenced code blocks to have a language flag: |
43 | | -lint[ 'fenced-code-flag' ] = [ 'error' ]; |
44 | | - |
45 | | -// Define the fenced code marker: |
46 | | -lint[ 'fenced-code-marker' ] = [ 'error', '`' ]; |
47 | | - |
48 | | -// Require a Markdown file to have the file extension `*.md`: |
49 | | -lint[ 'file-extension' ] = [ 'error', 'md' ]; |
50 | | - |
51 | | -// Require definitions be placed at the end of a file: |
52 | | -lint[ 'final-definition' ] = [ 'off' ]; // NOTE: we turn this off due to definitions being wrapped in HTML tags |
53 | | - |
54 | | -// Require a final newline (see http://unix.stackexchange.com/questions/18743): |
55 | | -lint[ 'final-newline' ] = [ 'error' ]; |
56 | | - |
57 | | -// Specify a first heading level: |
58 | | -lint[ 'first-heading-level' ] = [ 'error', 1 ]; |
59 | | - |
60 | | -// Prevent too many spaces from being used to hard break: |
61 | | -lint[ 'hard-break-spaces' ] = [ 'error' ]; |
62 | | - |
63 | | -// Warn when headings increment by more than 1 level: |
64 | | -// lint[ 'heading-increment' ] = [ 'warn' ]; |
65 | | - |
66 | | -// Define the heading style: |
67 | | -lint[ 'heading-style' ] = [ 'error', 'atx' ]; |
68 | | - |
69 | | -// Require double quotes for link titles: |
70 | | -lint[ 'link-title-style' ] = [ 'error', '"' ]; |
71 | | - |
72 | | -// Prevent unnecessary indentation of list bullets: |
73 | | -lint[ 'list-item-bullet-indent' ] = [ 'error' ]; |
74 | | - |
75 | | -// Enforce consistent indentation of list items: |
76 | | -lint[ 'list-item-content-indent' ] = [ 'error' ]; |
77 | | - |
78 | | -// Require list items be indented using spaces: |
79 | | -lint[ 'list-item-indent' ] = [ 'error', 'space' ]; |
80 | | - |
81 | | -// Require consistent list item spacing: |
82 | | -lint[ 'list-item-spacing' ] = [ 'error' ]; |
83 | | - |
84 | | -// Enforce a maximum heading length: |
85 | | -lint[ 'maximum-heading-length' ] = [ 'error', 80 ]; // characters |
86 | | - |
87 | | -// Do not enforce a maximum line length: |
88 | | -lint[ 'maximum-line-length' ] = [ 'off' ]; |
89 | | - |
90 | | -// Require a protocol for links: |
91 | | -lint[ 'no-auto-link-without-protocol' ] = [ 'error' ]; |
92 | | - |
93 | | -// Require caret in blockquotes: |
94 | | -lint[ 'no-blockquote-without-caret' ] = [ 'error' ]; |
95 | | - |
96 | | -// Allow consecutive blank lines: |
97 | | -lint[ 'no-consecutive-blank-lines' ] = [ 'off' ]; |
98 | | - |
99 | | -// Prevent duplicate definitions: |
100 | | -lint[ 'no-duplicate-definitions' ] = [ 'error' ]; |
101 | | - |
102 | | -// Prevent duplicate headings within a section: |
103 | | -lint[ 'no-duplicate-headings-in-section' ] = [ 'error' ]; |
104 | | - |
105 | | -// Allow duplicate headings: |
106 | | -lint[ 'no-duplicate-headings' ] = [ 'off' ]; |
107 | | - |
108 | | -// Prevent emphasis being used as a heading: |
109 | | -lint[ 'no-emphasis-as-heading' ] = [ 'error' ]; |
110 | | - |
111 | | -// Prevent empty URLs in images and links: |
112 | | -lint[ 'no-empty-url' ] = [ 'error' ]; |
113 | | - |
114 | | -// Prevent filenames beginning with an article: |
115 | | -lint[ 'no-file-name-articles' ] = [ 'error' ]; |
116 | | - |
117 | | -// Prevent consecutive dashes in filenames: |
118 | | -lint[ 'no-file-name-consecutive-dashes' ] = [ 'error' ]; |
119 | | - |
120 | | -// Prevent irregular characters in filenames: |
121 | | -lint[ 'no-file-name-irregular-characters' ] = [ 'error', '\\.a-zA-Z0-9-_' ]; |
122 | | - |
123 | | -// Prevent mixed case filenames: |
124 | | -lint[ 'no-file-name-mixed-case' ] = [ 'error' ]; |
125 | | - |
126 | | -// Prevent filenames beginning or ending with dashes: |
127 | | -lint[ 'no-file-name-outer-dashes' ] = [ 'error' ]; |
128 | | - |
129 | | -// Prevent heading content indentation: |
130 | | -lint[ 'no-heading-content-indent' ] = [ 'error' ]; |
131 | | - |
132 | | -// Prevent heading indentation: |
133 | | -lint[ 'no-heading-indent' ] = [ 'error' ]; |
134 | | - |
135 | | -// Prevent h7+ "headings": |
136 | | -lint[ 'no-heading-like-paragraph' ] = [ 'error' ]; |
137 | | - |
138 | | -// Prevent punctuation at the end of a heading: |
139 | | -lint[ 'no-heading-punctuation' ] = [ 'error' ]; |
140 | | - |
141 | | -// Allow HTML: |
142 | | -lint[ 'no-html' ] = [ 'off' ]; |
143 | | - |
144 | | -// Prevent inline padding: |
145 | | -lint[ 'no-inline-padding' ] = [ 'error' ]; |
146 | | - |
147 | | -// Prevent literal URLs (require angle brackets): |
148 | | -lint[ 'no-literal-urls' ] = [ 'error' ]; |
149 | | - |
150 | | -// Require blank lines between nodes: |
151 | | -lint[ 'no-missing-blank-lines' ] = [ 'error' ]; |
152 | | - |
153 | | -// Allow multiple top-level headings: |
154 | | -lint[ 'no-multiple-toplevel-headings' ] = [ 'off' ]; |
155 | | - |
156 | | -// Do not allow references to be used like URLs: |
157 | | -lint[ 'no-reference-like-url' ] = [ 'error' ]; |
158 | | - |
159 | | -// Allow shell commands to be prefixed with `$` symbols: |
160 | | -lint[ 'no-shell-dollars' ] = [ 'off' ]; |
161 | | - |
162 | | -// Prohibit shortcut reference images: |
163 | | -lint[ 'no-shortcut-reference-image' ] = [ 'error' ]; |
164 | | - |
165 | | -// Prevent shortcut reference links: |
166 | | -lint[ 'no-shortcut-reference-link' ] = [ 'error' ]; |
167 | | - |
168 | | -// Prevent table indentation: |
169 | | -lint[ 'no-table-indentation' ] = [ 'error' ]; |
170 | | - |
171 | | -// Require the use of spaces: |
172 | | -lint[ 'no-tabs' ] = [ 'error' ]; |
173 | | - |
174 | | -// Prohibit undefined references: |
175 | | -lint[ 'no-undefined-references' ] = [ 'error' ]; |
176 | | - |
177 | | -// Require all definitions be used: |
178 | | -lint[ 'no-unused-definitions' ] = [ 'error' ]; |
179 | | - |
180 | | -// Require ordered lists to use periods (e.g., `1.`, `2.`, etc): |
181 | | -lint[ 'ordered-list-marker-style' ] = [ 'error', '.' ]; |
182 | | - |
183 | | -// Define the ordered list style: |
184 | | -// lint[ 'ordered-list-marker-value' ] = [ 'error', 'ordered' ]; |
185 | | - |
186 | | -// Define the horizontal rule style: |
187 | | -lint[ 'rule-style' ] = [ 'error', '---' ]; |
188 | | - |
189 | | -// Define the strong marker: |
190 | | -lint[ 'strong-marker' ] = [ 'error', '_' ]; |
191 | | - |
192 | | -// Require table padding: |
193 | | -lint[ 'table-cell-padding' ] = [ 'error', 'padded' ]; |
194 | | - |
195 | | -// Require table pipe alignment: |
196 | | -lint[ 'table-pipe-alignment' ] = [ 'error' ]; |
197 | | - |
198 | | -// Require table rows to be fenced in table pipes: |
199 | | -lint[ 'table-pipes' ] = [ 'error' ]; |
200 | | - |
201 | | -// Define the unordered list marker style: |
202 | | -// lint[ 'unordered-list-marker-style' ] = [ 'error', 'consistent' ]; |
203 | | - |
204 | | - |
205 | | -// Validate links: |
206 | | -vlinks[ 'repository' ] = ''; |
| 5 | +var config = { |
| 6 | + 'plugins': require( './plugins' ) |
| 7 | +}; |
207 | 8 |
|
208 | 9 |
|
209 | 10 | // EXPORTS // |
|
0 commit comments