|
| 1 | +--- |
| 2 | +# Documentation: |
| 3 | +# https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md |
| 4 | + |
| 5 | +# Default state for all rules |
| 6 | +default: false |
| 7 | + |
| 8 | +# MD001/heading-increment/header-increment - Heading levels should only increment by one level at a time |
| 9 | +MD001: true |
| 10 | + |
| 11 | +# MD002/first-heading-h1/first-header-h1 - First heading should be a top-level heading |
| 12 | +MD002: |
| 13 | + # Heading level |
| 14 | + level: 1 |
| 15 | + |
| 16 | +# MD003/heading-style/header-style - Heading style |
| 17 | + |
| 18 | +MD003: |
| 19 | + # Heading style |
| 20 | + # # ATX style H1 |
| 21 | + style: "atx" |
| 22 | + |
| 23 | +# MD004/ul-style - Unordered list style |
| 24 | +MD004: |
| 25 | + # List style |
| 26 | + style: "sublist" |
| 27 | + |
| 28 | +# MD005/list-indent - Inconsistent indentation for list items at the same level |
| 29 | +MD005: true |
| 30 | + |
| 31 | +# MD006/ul-start-left - Consider starting bulleted lists at the beginning of the line |
| 32 | +MD006: true |
| 33 | + |
| 34 | +# MD007/ul-indent - Unordered list indentation |
| 35 | +MD007: |
| 36 | + # Spaces for indent |
| 37 | + indent: 4 |
| 38 | + # Whether to indent the first level of the list |
| 39 | + start_indented: false |
| 40 | + |
| 41 | +# MD009/no-trailing-spaces - Trailing spaces |
| 42 | +MD009: |
| 43 | + # Spaces for line break |
| 44 | + br_spaces: 2 |
| 45 | + # Allow spaces for empty lines in list items |
| 46 | + list_item_empty_lines: false |
| 47 | + # Include unnecessary breaks |
| 48 | + strict: false |
| 49 | + |
| 50 | +# MD010/no-hard-tabs - Hard tabs |
| 51 | +MD010: |
| 52 | + # Include code blocks |
| 53 | + code_blocks: false |
| 54 | + # Number of spaces for each hard tab |
| 55 | + spaces_per_tab: 1 |
| 56 | + |
| 57 | +# MD011/no-reversed-links - Reversed link syntax |
| 58 | +MD011: true |
| 59 | + |
| 60 | +# MD012/no-multiple-blanks - Multiple consecutive blank lines |
| 61 | +MD012: |
| 62 | + # Consecutive blank lines |
| 63 | + maximum: 1 |
| 64 | +# MD013/line-length - Line length |
| 65 | +# |
| 66 | +MD013: |
| 67 | + # Number of characters |
| 68 | + line_length: 80 |
| 69 | + # Number of characters for headings |
| 70 | + heading_line_length: 80 |
| 71 | + # Number of characters for code blocks |
| 72 | + code_block_line_length: 160 |
| 73 | + # Include code blocks |
| 74 | + code_blocks: false |
| 75 | + # Include tables |
| 76 | + tables: false |
| 77 | + # Include headings |
| 78 | + headings: true |
| 79 | + # Strict length checking (e.g. allow for longer URLs) |
| 80 | + strict: false |
| 81 | + # Stern length checking |
| 82 | + stern: false |
| 83 | + |
| 84 | +# MD014/commands-show-output - Dollar signs used before commands without showing output |
| 85 | +# TODO: set false for now but we should consider enabling it |
| 86 | +# https://cirosantilli.com/markdown-style-guide#dollar-signs-in-shell-code |
| 87 | +MD014: false |
| 88 | + |
| 89 | +# MD018/no-missing-space-atx - No space after hash on atx style heading |
| 90 | +MD018: true |
| 91 | + |
| 92 | +# MD019/no-multiple-space-atx - Multiple spaces after hash on atx style heading |
| 93 | +MD019: true |
| 94 | + |
| 95 | +# MD022/blanks-around-headings/blanks-around-headers - Headings should be surrounded by blank lines |
| 96 | +MD022: |
| 97 | + # Blank lines above heading |
| 98 | + lines_above: 1 |
| 99 | + # Blank lines below heading |
| 100 | + lines_below: 1 |
| 101 | + |
| 102 | +# MD023/heading-start-left/header-start-left - Headings must start at the beginning of the line |
| 103 | +MD023: true |
| 104 | + |
| 105 | +# MD025/single-title/single-h1 - Multiple top-level headings in the same document |
| 106 | +# TODO: consider enabling it |
| 107 | + |
| 108 | +# MD026/no-trailing-punctuation - Trailing punctuation in heading |
| 109 | +MD026: |
| 110 | + # Punctuation characters |
| 111 | + punctuation: ".,;:!。,;:!" |
| 112 | + |
| 113 | +# MD027/no-multiple-space-blockquote - Multiple spaces after blockquote symbol |
| 114 | +MD027: true |
| 115 | + |
| 116 | +# MD028/no-blanks-blockquote - Blank line inside blockquote |
| 117 | +MD028: true |
| 118 | + |
| 119 | +# MD029/ol-prefix - Ordered list item prefix |
| 120 | +MD029: |
| 121 | + # List style |
| 122 | + style: "one_or_ordered" |
| 123 | + |
| 124 | +# MD030/list-marker-space - Spaces after list markers |
| 125 | +MD030: |
| 126 | + # Spaces for single-line unordered list items |
| 127 | + ul_single: 1 |
| 128 | + # Spaces for single-line ordered list items |
| 129 | + ol_single: 1 |
| 130 | + # Spaces for multi-line unordered list items |
| 131 | + ul_multi: 1 |
| 132 | + # Spaces for multi-line ordered list items |
| 133 | + ol_multi: 1 |
| 134 | + |
| 135 | +# MD031/blanks-around-fences - Fenced code blocks should be surrounded by blank lines |
| 136 | +MD031: |
| 137 | + # Include list items |
| 138 | + list_items: true |
| 139 | + |
| 140 | +# MD033/no-inline-html - Inline HTML |
| 141 | +MD033: |
| 142 | + # Allowed elements |
| 143 | + allowed_elements: ["br", "center", "img", "script", "form", "input"] |
| 144 | + |
| 145 | +# MD034/no-bare-urls - Bare URL used |
| 146 | +MD034: true |
| 147 | + |
| 148 | +# MD035/hr-style - Horizontal rule style |
| 149 | +MD035: |
| 150 | + # Horizontal rule style |
| 151 | + style: "---" |
| 152 | + |
| 153 | +# MD037/no-space-in-emphasis - Spaces inside emphasis markers |
| 154 | +MD037: true |
| 155 | + |
| 156 | +# MD038/no-space-in-code - Spaces inside code span elements |
| 157 | +MD038: true |
| 158 | + |
| 159 | +# MD039/no-space-in-links - Spaces inside link text |
| 160 | +MD039: true |
| 161 | + |
| 162 | +# MD040/fenced-code-language - Fenced code blocks should have a language specified |
| 163 | +MD040: true |
| 164 | + |
| 165 | +# MD041/first-line-heading/first-line-h1 - First line in a file should be a top-level heading |
| 166 | +MD041: |
| 167 | + # Heading level |
| 168 | + level: 1 |
| 169 | + # RegExp for matching title in front matter |
| 170 | + front_matter_title: "^\\s*title\\s*[:=]" |
| 171 | + |
| 172 | +# MD042/no-empty-links - No empty links |
| 173 | +MD042: true |
| 174 | + |
| 175 | +# MD046/code-block-style - Code block style |
| 176 | +MD046: |
| 177 | + # Block style |
| 178 | + style: "fenced" |
| 179 | + |
| 180 | +# MD047/single-trailing-newline - Files should end with a single newline character |
| 181 | +MD047: true |
| 182 | + |
| 183 | +# MD048/code-fence-style - Code fence style |
| 184 | +MD048: |
| 185 | + # Code fence style |
| 186 | + style: "backtick" |
| 187 | + |
| 188 | +# MD049/emphasis-style - Emphasis style should be consistent |
| 189 | +MD049: |
| 190 | + # Emphasis style should be consistent |
| 191 | + style: "underscore" |
| 192 | + |
| 193 | +# MD050/strong-style - Strong style should be consistent |
| 194 | +MD050: |
| 195 | + # Strong style should be consistent |
| 196 | + style: "asterisk" |
0 commit comments