|
1 | 1 | --- |
2 | | -# Example markdownlint YAML configuration with all properties set to their default value |
| 2 | +# markdownlint configuration: default built-in rules plus custom rule overrides |
3 | 3 |
|
4 | | -# Default state for all rules |
5 | 4 | default: true |
6 | 5 |
|
7 | | -# Path to configuration file to extend |
8 | | -# extends: null |
9 | | - |
10 | | -# MD001/heading-increment/header-increment - Heading levels should only increment by one level at a time |
11 | | -MD001: true |
12 | | - |
13 | | -# MD002/first-heading-h1/first-header-h1 - First heading should be a top-level heading |
14 | | -MD002: |
15 | | - # Heading level |
16 | | - level: 1 |
17 | | - |
18 | | -# MD003/heading-style/header-style - Heading style |
19 | | -MD003: |
20 | | - # Heading style |
21 | | - style: "consistent" |
22 | | - |
23 | | -# MD004/ul-style - Unordered list style |
24 | | -MD004: |
25 | | - # List style |
26 | | - style: "consistent" |
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: 2 |
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: true |
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 | | - |
65 | | -# MD013/line-length - Line length |
| 6 | +# MD013/line-length - line length limits (non-default) |
66 | 7 | MD013: |
67 | | - # Number of characters |
68 | 8 | line_length: 500 |
69 | | - # Number of characters for headings |
70 | 9 | heading_line_length: 500 |
71 | | - # Number of characters for code blocks |
72 | 10 | code_block_line_length: 500 |
73 | | - # Include code blocks |
74 | 11 | code_blocks: true |
75 | | - # Include tables |
76 | 12 | tables: true |
77 | | - # Include headings |
78 | 13 | headings: true |
79 | | - # Strict length checking |
80 | 14 | strict: false |
81 | | - # Stern length checking |
82 | 15 | stern: false |
83 | 16 |
|
84 | | -# MD014/commands-show-output - Dollar signs used before commands without showing output |
85 | | -MD014: true |
86 | | - |
87 | | -# MD018/no-missing-space-atx - No space after hash on atx style heading |
88 | | -MD018: true |
89 | | - |
90 | | -# MD019/no-multiple-space-atx - Multiple spaces after hash on atx style heading |
91 | | -MD019: true |
92 | | - |
93 | | -# MD020/no-missing-space-closed-atx - No space inside hashes on closed atx style heading |
94 | | -MD020: true |
95 | | - |
96 | | -# MD021/no-multiple-space-closed-atx - Multiple spaces inside hashes on closed atx style heading |
97 | | -MD021: true |
98 | | - |
99 | | -# MD022/blanks-around-headings/blanks-around-headers - Headings should be surrounded by blank lines |
100 | | -MD022: |
101 | | - # Blank lines above heading |
102 | | - lines_above: 1 |
103 | | - # Blank lines below heading |
104 | | - lines_below: 1 |
105 | | - |
106 | | -# MD023/heading-start-left/header-start-left - Headings must start at the beginning of the line |
107 | | -MD023: true |
108 | | - |
109 | | -# MD024/no-duplicate-heading/no-duplicate-header - Multiple headings with the same content |
110 | | -MD024: |
111 | | - # Only check sibling headings |
112 | | - siblings_only: false |
113 | | - |
114 | | -# MD025/single-title/single-h1 - Multiple top-level headings in the same document |
115 | | -MD025: |
116 | | - # Heading level |
117 | | - level: 1 |
118 | | - # RegExp for matching title in front matter |
119 | | - front_matter_title: "^\\s*title\\s*[:=]" |
120 | | - |
121 | | -# MD026/no-trailing-punctuation - Trailing punctuation in heading |
122 | | -MD026: |
123 | | - # Punctuation characters |
124 | | - punctuation: ".,;:!。,;:!" |
125 | | - |
126 | | -# MD027/no-multiple-space-blockquote - Multiple spaces after blockquote symbol |
127 | | -MD027: true |
128 | | - |
129 | | -# MD028/no-blanks-blockquote - Blank line inside blockquote |
130 | | -MD028: true |
131 | | - |
132 | | -# MD029/ol-prefix - Ordered list item prefix |
133 | | -MD029: |
134 | | - # List style |
135 | | - style: "one_or_ordered" |
136 | | - |
137 | | -# MD030/list-marker-space - Spaces after list markers |
138 | | -MD030: |
139 | | - # Spaces for single-line unordered list items |
140 | | - ul_single: 1 |
141 | | - # Spaces for single-line ordered list items |
142 | | - ol_single: 1 |
143 | | - # Spaces for multi-line unordered list items |
144 | | - ul_multi: 1 |
145 | | - # Spaces for multi-line ordered list items |
146 | | - ol_multi: 1 |
147 | | - |
148 | | -# MD031/blanks-around-fences - Fenced code blocks should be surrounded by blank lines |
149 | | -MD031: |
150 | | - # Include list items |
151 | | - list_items: true |
152 | | - |
153 | | -# MD032/blanks-around-lists - Lists should be surrounded by blank lines |
154 | | -MD032: true |
155 | | - |
156 | | -# MD033/no-inline-html - Inline HTML |
| 17 | +# MD033/no-inline-html - allow anchor elements for custom anchors |
157 | 18 | MD033: |
158 | | - # Allowed elements |
159 | 19 | allowed_elements: ["a"] |
160 | 20 |
|
161 | | -# MD034/no-bare-urls - Bare URL used |
162 | | -MD034: true |
163 | | - |
164 | | -# MD035/hr-style - Horizontal rule style |
165 | | -MD035: |
166 | | - # Horizontal rule style |
167 | | - style: "consistent" |
168 | | - |
169 | | -# MD036/no-emphasis-as-heading/no-emphasis-as-header - Emphasis used instead of a heading |
170 | | -MD036: |
171 | | - # Punctuation characters |
172 | | - punctuation: ".,;:!?。,;:!?" |
173 | | - |
174 | | -# MD037/no-space-in-emphasis - Spaces inside emphasis markers |
175 | | -MD037: true |
176 | | - |
177 | | -# MD038/no-space-in-code - Spaces inside code span elements |
178 | | -MD038: true |
179 | | - |
180 | | -# MD039/no-space-in-links - Spaces inside link text |
181 | | -MD039: true |
182 | | - |
183 | | -# MD040/fenced-code-language - Fenced code blocks should have a language specified |
184 | | -MD040: true |
185 | | - |
186 | | -# MD041/first-line-heading/first-line-h1 - First line in a file should be a top-level heading |
187 | | -MD041: |
188 | | - # Heading level |
189 | | - level: 1 |
190 | | - # RegExp for matching title in front matter |
191 | | - front_matter_title: "^\\s*title\\s*[:=]" |
192 | | - |
193 | | -# MD042/no-empty-links - No empty links |
194 | | -MD042: true |
195 | | - |
196 | | -# MD043/required-headings/required-headers - Required heading structure |
197 | | -# MD043: |
198 | | - # List of headings |
199 | | - # headings: ["*"] |
200 | | - # List of headings |
201 | | - # headers: [] |
202 | | - |
203 | | -# MD044/proper-names - Proper names should have the correct capitalization |
204 | | -MD044: |
205 | | - # List of proper names |
206 | | - names: [] |
207 | | - # Include code blocks |
208 | | - code_blocks: true |
209 | | - |
210 | | -# MD045/no-alt-text - Images should have alternate text (alt text) |
211 | | -MD045: true |
212 | | - |
213 | | -# MD046/code-block-style - Code block style |
214 | | -MD046: |
215 | | - # Block style |
216 | | - style: "consistent" |
217 | | - |
218 | | -# MD047/single-trailing-newline - Files should end with a single newline character |
219 | | -MD047: true |
220 | | - |
221 | | -# MD048/code-fence-style - Code fence style |
222 | | -MD048: |
223 | | - # Code fence style |
224 | | - style: "consistent" |
225 | | - |
226 | | -# MD060/table-column-style - Table column style |
227 | | -MD060: |
228 | | - # Table column style |
229 | | - style: "aligned" |
230 | | - |
231 | | -# ascii-only: no built-in path/emoji defaults; set paths and emoji in config |
232 | | -# - allowedUnicode: optional; single chars allowed in all files (no default) |
233 | | -# - unicodeReplacements: optional; if omitted, rule uses built-in defaults (arrows, quotes, <=>=*) |
| 21 | +# ascii-only: disallow non-ASCII except in configured paths; inline code (backticks) always stripped |
| 22 | +# No built-in path/emoji defaults. Options: |
| 23 | +# - allowedPathPatternsUnicode: glob list; files where any non-ASCII is allowed |
| 24 | +# - allowedPathPatternsEmoji: glob list; files where only allowedEmoji chars are allowed |
| 25 | +# - allowedEmoji: emoji/chars allowed in paths matching allowedPathPatternsEmoji (multi-codepoint OK) |
| 26 | +# - allowedUnicode: chars allowed in all files; extends default set (é, ï, ñ, ç, etc.) unless replace below |
| 27 | +# - allowedUnicodeReplaceDefault: true = use only allowedUnicode list (no default set) |
| 28 | +# - allowUnicodeInCodeBlocks: true (default) = skip fenced blocks; false = check them for unicode |
| 29 | +# - disallowUnicodeInCodeBlockTypes: when allowUnicodeInCodeBlocks false, only these block types checked |
| 30 | +# (block type = first word after opening fence, e.g. "text" from ```text); empty = check all blocks |
| 31 | +# - unicodeReplacements: object or [char, replacement] array; built-in defaults (arrows, quotes, <=>=*) if omitted |
234 | 32 | ascii-only: |
235 | 33 | allowedPathPatternsUnicode: |
236 | 34 | # - "**/README.md" |
237 | 35 | allowedPathPatternsEmoji: |
238 | | - - ".markdownlint-rules/README.md" |
| 36 | + - "markdownlint-rules/README.md" |
| 37 | + # allowedUnicode: |
| 38 | + # - "ń" # additions on top of default (fixtures e.g. positive.md) |
| 39 | + # allowedUnicodeReplaceDefault: false # true = use only allowedUnicode list, no default set |
239 | 40 | allowedEmoji: |
240 | 41 | - "✅" |
241 | 42 | - "❌" |
242 | 43 | - "📊" |
243 | 44 | - "⚠️" |
244 | 45 |
|
245 | | -# heading-title-case: enforce title case for headings; words in backticks ignored; configurable lowercase words |
| 46 | +# heading-title-case: AP-style headline capitalization; words in backticks ignored |
246 | 47 | # heading-title-case: |
247 | | -# lowercaseWords: ["a", "an", "the", "vs", ...] # optional override; default list used if omitted |
| 48 | +# lowercaseWords: ["through", ...] # optional; extends default list (add words) |
| 49 | +# lowercaseWordsReplaceDefault: true # optional; true = use only lowercaseWords list, no default set |
248 | 50 |
|
249 | | -# allow-custom-anchors: anchor id patterns and optional placement per pattern |
250 | | -# - allowedIdPatterns: array of regex strings or { pattern, placement? }; placement is per anchor regex |
251 | | -# - strictPlacement: if true (default), enforce placement when placement is set for that pattern |
| 51 | +# allow-custom-anchors: require anchor ids to match patterns; optional placement (line/heading) per pattern |
| 52 | +# - allowedIdPatterns: list of regex strings or { pattern, placement? }; placement applies per pattern |
| 53 | +# - strictPlacement: true (default) = enforce placement when a pattern has placement set |
252 | 54 | allow-custom-anchors: |
253 | 55 | allowedIdPatterns: |
254 | 56 | - pattern: "^spec-[a-z0-9-]+$" |
|
0 commit comments