|
| 1 | +# Enable all rules; we'll configure some of them below. |
| 2 | +all |
| 3 | + |
| 4 | +# MD001: Header levels should only increment by one level at a time. |
| 5 | +# Normally, this is a fair rule, but it does not quite work for our cases, |
| 6 | +# especially in our humongous functions list. So disable it. |
| 7 | +exclude_rule 'MD001' |
| 8 | + |
| 9 | +# MD002: First header should be a top level header. |
| 10 | +# Some files do not have a top-level header, because it doesn't make sense for |
| 11 | +# them, or just looks incredibly stupid on the rendered page. So disable this |
| 12 | +# entire rule. |
| 13 | +exclude_rule 'MD002' |
| 14 | + |
| 15 | +# MD004: Unordered list style. |
| 16 | +# Use dashes for unordered lists. All lists. Even sublists. |
| 17 | +rule 'MD004', :style => :dash |
| 18 | + |
| 19 | +# MD013: Line length. |
| 20 | +# Allow lines to be up to 120 characters long, see the .editorconfig file. |
| 21 | +# We also ignore code blocks, because they are often long and should not be |
| 22 | +# wrapped at all. Same goes for tables. |
| 23 | +rule 'MD013', :line_length => 120, :ignore_code_blocks => true, :tables => false |
| 24 | + |
| 25 | +# MD024: Multiple headers with the same content. |
| 26 | +# Allow multiple headers with the same content so long they are under different |
| 27 | +# parent headers. |
| 28 | +rule 'MD024', :allow_different_nesting => true |
| 29 | + |
| 30 | +# MD026: Trailling punctuation in header. |
| 31 | +# Allow question marks (FAQ-style). |
| 32 | +rule 'MD026', :punctuation => '.,;:!' |
| 33 | + |
| 34 | +# MD029: Ordered list item prefix. |
| 35 | +# Should increase in numerical order. |
| 36 | +rule 'MD029', :style => :ordered |
| 37 | + |
| 38 | +# MD033: Inline HTML. |
| 39 | +# Allow certain HTML elements, because we use them for nicer page layout. |
| 40 | +rule 'MD033', :allowed_elements => 'center, div, sup, br, kbd' |
| 41 | + |
| 42 | +# MD037: Spaces inside emphasis markers. |
| 43 | +# This rule is broken. See https://github.com/markdownlint/markdownlint/issues/84 |
| 44 | +exclude_rule 'MD037' |
| 45 | + |
| 46 | +# MD041: First line in file should be a top-level header. |
| 47 | +# See comment to MD002. It makes no sense to set this to H2 for similar reasons, |
| 48 | +# we have TOML frontmatter with an automatic h1 in the rendered page. |
| 49 | +exclude_rule 'MD041' |
0 commit comments