Skip to content

Commit da6d6a5

Browse files
committed
Update linting config
1 parent fbf4539 commit da6d6a5

File tree

5 files changed

+478
-4
lines changed

5 files changed

+478
-4
lines changed

.github/workflows/ci.yaml

+9
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,12 @@ jobs:
2020
echo "Please update the table of contents with make toc"
2121
exit 1
2222
fi
23+
- run: make markdownlint
24+
- run: git diff
25+
- run: |
26+
if [ -z "$(git status --porcelain)" ]; then
27+
echo "No changes"
28+
else
29+
echo "Please fix the markdownlint errors"
30+
exit 1
31+
fi

.markdownlint.yaml

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
default: true
2+
3+
# MD013/line-length
4+
# https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md013.md
5+
MD013:
6+
line_length: 120
7+
heading_line_length: 80
8+
code_blocks: false
9+
tables: false
10+
headings: true
11+
12+
# MD024/no-duplicate-heading
13+
# https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md024.md
14+
MD024:
15+
siblings_only: true
16+
17+
# MD026/no-trailing-punctuation
18+
# https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md026.md
19+
MD026:
20+
# Punctuation characters
21+
punctuation: ".,;:,;:!"
22+
23+
# MD031/blanks-around-fences
24+
# https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md031.md
25+
MD031: false
26+
27+
# MD033/no-inline-html
28+
# https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md033.md
29+
MD033:
30+
allowed_elements:
31+
- br
32+
- details
33+
- img
34+
- strong
35+
- summary
36+
37+
# MD036/no-emphasis-as-heading
38+
# https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md036.md
39+
MD036: false
40+
41+
MD004:
42+
style: dash
43+
44+
MD010: false

Makefile

+8-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
1+
PHONY: deps
2+
deps:
3+
npm install
4+
15
PHONY: toc
2-
toc:
3-
npm install # installs the markdown-toc at the expected version from package.json
6+
toc: deps
47
npx markdown-toc -i style-guide.md --bullets="*" --maxdepth=3
8+
9+
markdownlint: deps
10+
npx markdownlint-cli2 style-guide.md --config=.markdownlint.yaml

0 commit comments

Comments
 (0)