|
1 | 1 | # Enable all rules; we'll configure some of them below.
|
2 |
| -all |
| 2 | +default: true |
3 | 3 |
|
4 | 4 | # MD001: Header levels should only increment by one level at a time.
|
5 | 5 | # Normally, this is a fair rule, but it does not quite work for our cases,
|
6 | 6 | # especially in our humongous functions list. So disable it.
|
7 |
| -exclude_rule 'MD001' |
| 7 | +MD001: false |
8 | 8 |
|
9 | 9 | # MD002: First header should be a top level header.
|
10 | 10 | # Some files do not have a top-level header, because it doesn't make sense for
|
11 | 11 | # them, or just looks incredibly stupid on the rendered page. So disable this
|
12 | 12 | # entire rule.
|
13 |
| -exclude_rule 'MD002' |
| 13 | +MD002: false |
14 | 14 |
|
15 | 15 | # MD004: Unordered list style.
|
16 | 16 | # Use dashes for unordered lists. All lists. Even sublists.
|
17 |
| -rule 'MD004', :style => :dash |
| 17 | +MD004: |
| 18 | + style: "dash" |
18 | 19 |
|
19 | 20 | # MD013: Line length.
|
20 | 21 | # Allow lines to be up to 120 characters long, see the .editorconfig file.
|
21 | 22 | # We also ignore code blocks, because they are often long and should not be
|
22 | 23 | # wrapped at all. Same goes for tables.
|
23 |
| -rule 'MD013', :line_length => 120, :ignore_code_blocks => true, :tables => false |
| 24 | +MD013: |
| 25 | + line_length: 120 |
| 26 | + code_blocks: false |
| 27 | + tables: false |
24 | 28 |
|
25 | 29 | # MD024: Multiple headers with the same content.
|
26 | 30 | # Allow multiple headers with the same content so long they are under different
|
27 | 31 | # parent headers.
|
28 |
| -rule 'MD024', :allow_different_nesting => true |
| 32 | +MD024: |
| 33 | + siblings_only: true |
29 | 34 |
|
30 | 35 | # MD026: Trailling punctuation in header.
|
31 | 36 | # Allow question marks (FAQ-style).
|
32 |
| -rule 'MD026', :punctuation => '.,;:!' |
| 37 | +MD026: |
| 38 | + punctuation: ".,;:!" |
33 | 39 |
|
34 | 40 | # MD029: Ordered list item prefix.
|
35 | 41 | # Should increase in numerical order.
|
36 |
| -rule 'MD029', :style => :ordered |
| 42 | +MD029: |
| 43 | + style: "ordered" |
37 | 44 |
|
38 | 45 | # MD033: Inline HTML.
|
39 | 46 | # Allow certain HTML elements, because we use them for nicer page layout.
|
40 |
| -rule 'MD033', :allowed_elements => 'center, div, sup, br, kbd' |
| 47 | +MD033: |
| 48 | + allowed_elements: ["center", "div", "sup", "br", "kbd"] |
41 | 49 |
|
42 | 50 | # MD037: Spaces inside emphasis markers.
|
43 | 51 | # This rule is broken. See https://github.com/markdownlint/markdownlint/issues/84
|
44 |
| -exclude_rule 'MD037' |
| 52 | +MD037: false |
45 | 53 |
|
46 | 54 | # MD041: First line in file should be a top-level header.
|
47 | 55 | # See comment to MD002. It makes no sense to set this to H2 for similar reasons,
|
48 | 56 | # we have TOML frontmatter with an automatic h1 in the rendered page.
|
49 |
| -exclude_rule 'MD041' |
| 57 | +MD041: false |
| 58 | + |
| 59 | +# MD048: Code fence style. |
| 60 | +# Use backticks for code fences. |
| 61 | +MD048: |
| 62 | + style: "backtick" |
| 63 | + |
| 64 | +# MD049: Emphasis style. (Italics) |
| 65 | +# Use asterisks for italics. |
| 66 | +# MD049: |
| 67 | +# style: "asterisk" |
| 68 | +# FIXME: Re-enable this rule once we have fixed all the italics in the docs. |
| 69 | +MD049: false |
| 70 | + |
| 71 | +# MD050: Strong style. |
| 72 | +# Use double asterisks for bold text. |
| 73 | +MD050: |
| 74 | + style: "asterisk" |
| 75 | + |
| 76 | +# MD051: Link fragments should be valid. |
| 77 | +# Disable this rule, because Hugo already checks for (potentially) broken links. |
| 78 | +MD051: false |
| 79 | + |
| 80 | +# MD052: Reference links and images should use a label that is defined. |
| 81 | +# Similar reasons as MD051, Hugo already checks for broken links. |
| 82 | +MD052: false |
| 83 | + |
| 84 | +# MD053: Link and image reference definitions should be needed. |
| 85 | +# Similar reasons as MD051, Hugo already checks for broken links. |
| 86 | +MD053: false |
| 87 | + |
| 88 | +# MD054: Link and image style. |
| 89 | +# Disable this rule, because it is very extensive and thus painful to configure. |
| 90 | +# By extension, also very painful to fix. |
| 91 | +MD054: false |
0 commit comments