Skip to content

Commit 70d84ba

Browse files
.pre-commit-config.yaml: Replace mdformat check with markdownlint-cli
Signed-off-by: Bernhard Kaindl <[email protected]>
1 parent 554e648 commit 70d84ba

File tree

3 files changed

+268
-3
lines changed

3 files changed

+268
-3
lines changed

.markdownlint.yaml

+259
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,259 @@
1+
# Example markdownlint configuration with all properties set to their default value
2+
3+
# Default state for all rules
4+
default: true
5+
6+
# Path to configuration file to extend
7+
extends: null
8+
9+
# MD001/heading-increment : Heading levels should only increment by one level at a time : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md001.md
10+
MD001: true
11+
12+
# MD003/heading-style : Heading style : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md003.md
13+
MD003:
14+
# Heading style
15+
style: "consistent"
16+
17+
# MD004/ul-style : Unordered list style : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md004.md
18+
MD004:
19+
# List style
20+
style: "consistent"
21+
22+
# MD005/list-indent : Inconsistent indentation for list items at the same level : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md005.md
23+
MD005: true
24+
25+
# MD007/ul-indent : Unordered list indentation : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md007.md
26+
MD007:
27+
# Spaces for indent
28+
indent: 2
29+
# Whether to indent the first level of the list
30+
start_indented: false
31+
# Spaces for first level indent (when start_indented is set)
32+
start_indent: 2
33+
34+
# MD009/no-trailing-spaces : Trailing spaces : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md009.md
35+
MD009:
36+
# Spaces for line break
37+
br_spaces: 2
38+
# Allow spaces for empty lines in list items
39+
list_item_empty_lines: false
40+
# Include unnecessary breaks
41+
strict: false
42+
43+
# MD010/no-hard-tabs : Hard tabs : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md010.md
44+
MD010:
45+
# Include code blocks
46+
code_blocks: true
47+
# Fenced code languages to ignore
48+
ignore_code_languages: []
49+
# Number of spaces for each hard tab
50+
spaces_per_tab: 1
51+
52+
# MD011/no-reversed-links : Reversed link syntax : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md011.md
53+
MD011: true
54+
55+
# MD012/no-multiple-blanks : Multiple consecutive blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md012.md
56+
MD012:
57+
# Consecutive blank lines
58+
maximum: 1
59+
60+
# MD013/line-length : Line length : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md013.md
61+
MD013:
62+
# Number of characters
63+
line_length: 362
64+
# Number of characters for headings
65+
heading_line_length: 210
66+
# Number of characters for code blocks
67+
code_block_line_length: 278
68+
# Include code blocks
69+
code_blocks: true
70+
# Include tables
71+
tables: true
72+
# Include headings
73+
headings: true
74+
# Strict length checking
75+
strict: false
76+
# Stern length checking
77+
stern: false
78+
79+
# MD014/commands-show-output : Dollar signs used before commands without showing output : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md014.md
80+
MD014: true
81+
82+
# MD018/no-missing-space-atx : No space after hash on atx style heading : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md018.md
83+
MD018: true
84+
85+
# MD019/no-multiple-space-atx : Multiple spaces after hash on atx style heading : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md019.md
86+
MD019: true
87+
88+
# MD020/no-missing-space-closed-atx : No space inside hashes on closed atx style heading : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md020.md
89+
MD020: true
90+
91+
# MD021/no-multiple-space-closed-atx : Multiple spaces inside hashes on closed atx style heading : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md021.md
92+
MD021: true
93+
94+
# MD022/blanks-around-headings : Headings should be surrounded by blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md022.md
95+
MD022:
96+
# Blank lines above heading
97+
lines_above: 1
98+
# Blank lines below heading
99+
lines_below: 1
100+
101+
# MD023/heading-start-left : Headings must start at the beginning of the line : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md023.md
102+
MD023: true
103+
104+
# MD024/no-duplicate-heading : Multiple headings with the same content : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md024.md
105+
MD024:
106+
# Only check sibling headings
107+
allow_different_nesting: false
108+
# Only check sibling headings
109+
siblings_only: false
110+
111+
# MD025/single-title/single-h1 : Multiple top-level headings in the same document : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md025.md
112+
MD025:
113+
# Heading level
114+
level: 1
115+
# RegExp for matching title in front matter
116+
front_matter_title: "^\\s*title\\s*[:=]"
117+
118+
# MD026/no-trailing-punctuation : Trailing punctuation in heading : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md026.md
119+
MD026:
120+
# Punctuation characters
121+
punctuation: ".,;:!。,;:!"
122+
123+
# MD027/no-multiple-space-blockquote : Multiple spaces after blockquote symbol : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md027.md
124+
MD027: true
125+
126+
# MD028/no-blanks-blockquote : Blank line inside blockquote : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md028.md
127+
MD028: true
128+
129+
# MD029/ol-prefix : Ordered list item prefix : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md029.md
130+
MD029:
131+
# List style
132+
style: "one_or_ordered"
133+
134+
# MD030/list-marker-space : Spaces after list markers : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md030.md
135+
MD030:
136+
# Spaces for single-line unordered list items
137+
ul_single: 1
138+
# Spaces for single-line ordered list items
139+
ol_single: 1
140+
# Spaces for multi-line unordered list items
141+
ul_multi: 1
142+
# Spaces for multi-line ordered list items
143+
ol_multi: 1
144+
145+
# MD031/blanks-around-fences : Fenced code blocks should be surrounded by blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md031.md
146+
MD031:
147+
# Include list items
148+
list_items: true
149+
150+
# MD032/blanks-around-lists : Lists should be surrounded by blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md032.md
151+
MD032: true
152+
153+
# MD033/no-inline-html : Inline HTML : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md033.md
154+
MD033:
155+
# Allowed elements
156+
allowed_elements: [img, kbd]
157+
158+
# MD034/no-bare-urls : Bare URL used : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md034.md
159+
MD034: true
160+
161+
# MD035/hr-style : Horizontal rule style : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md035.md
162+
MD035:
163+
# Horizontal rule style
164+
style: "consistent"
165+
166+
# MD036/no-emphasis-as-heading : Emphasis used instead of a heading : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md036.md
167+
MD036:
168+
# Punctuation characters
169+
punctuation: ".,;:!?。,;:!?"
170+
171+
# MD037/no-space-in-emphasis : Spaces inside emphasis markers : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md037.md
172+
MD037: true
173+
174+
# MD038/no-space-in-code : Spaces inside code span elements : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md038.md
175+
MD038: true
176+
177+
# MD039/no-space-in-links : Spaces inside link text : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md039.md
178+
MD039: true
179+
180+
# MD040/fenced-code-language : Fenced code blocks should have a language specified : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md040.md
181+
MD040:
182+
# List of languages
183+
allowed_languages: []
184+
# Require language only
185+
language_only: false
186+
187+
# MD041/first-line-heading/first-line-h1 : First line in a file should be a top-level heading : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md041.md
188+
MD041:
189+
# Heading level
190+
level: 1
191+
# RegExp for matching title in front matter
192+
front_matter_title: "^\\s*title\\s*[:=]"
193+
194+
# MD042/no-empty-links : No empty links : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md042.md
195+
MD042: true
196+
197+
# MD044/proper-names : Proper names should have the correct capitalization : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md044.md
198+
MD044:
199+
# List of proper names
200+
names: []
201+
# Include code blocks
202+
code_blocks: true
203+
# Include HTML elements
204+
html_elements: true
205+
206+
# MD045/no-alt-text : Images should have alternate text (alt text) : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md045.md
207+
MD045: false
208+
209+
# MD046/code-block-style : Code block style : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md046.md
210+
MD046:
211+
# Block style
212+
style: "consistent"
213+
214+
# MD047/single-trailing-newline : Files should end with a single newline character : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md047.md
215+
MD047: true
216+
217+
# MD048/code-fence-style : Code fence style : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md048.md
218+
MD048:
219+
# Code fence style
220+
style: "consistent"
221+
222+
# MD049/emphasis-style : Emphasis style : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md049.md
223+
MD049:
224+
# Emphasis style
225+
style: "consistent"
226+
227+
# MD050/strong-style : Strong style : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md050.md
228+
MD050:
229+
# Strong style
230+
style: "consistent"
231+
232+
# MD051/link-fragments : Link fragments should be valid : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md051.md
233+
MD051: true
234+
235+
# MD052/reference-links-images : Reference links and images should use a label that is defined : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md052.md
236+
MD052:
237+
# Include shortcut syntax
238+
shortcut_syntax: false
239+
240+
# MD053/link-image-reference-definitions : Link and image reference definitions should be needed : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md053.md
241+
MD053:
242+
# Ignored definitions
243+
ignored_definitions:
244+
- "//"
245+
246+
# MD054/link-image-style : Link and image style : https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md054.md
247+
MD054:
248+
# Allow autolinks
249+
autolink: true
250+
# Allow inline links and images
251+
inline: true
252+
# Allow full reference links and images
253+
full: true
254+
# Allow collapsed reference links and images
255+
collapsed: true
256+
# Allow shortcut reference links and images
257+
shortcut: true
258+
# Allow URLs as inline links
259+
url_inline: true

.pre-commit-config.yaml

+8-3
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,14 @@ repos:
7777
rev: v0.1.9
7878
hooks:
7979
- id: shellcheck
80-
- id: mdformat-check
81-
exclude: README-Unicode.md
82-
language: python
80+
81+
82+
- repo: https://github.com/igorshubovych/markdownlint-cli
83+
rev: v0.42.0
84+
hooks:
85+
- id: markdownlint
86+
87+
8388
- repo: https://github.com/pycqa/pylint
8489
rev: v2.17.4
8590
hooks:

CONTRIBUTING.md

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ But this `tox` is older, so install `tox==4.5.1` using `pip` (see below)
1717
```bash
1818
sudo dnf install tox;sudo rpm -e tox
1919
```
20+
2021
But preferably use `tox` from the virtual environment instead.
2122

2223
## Development setup on Ubuntu 24.04

0 commit comments

Comments
 (0)