Skip to content

Commit 66e3483

Browse files
committed
Add markdown lint action
1 parent 0963b5b commit 66e3483

File tree

3 files changed

+37
-0
lines changed

3 files changed

+37
-0
lines changed

.config/.markdownlint.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
line-length:
2+
line_length: 200
3+
tables: false
4+
no-inline-html:
5+
allowed_elements: ['p', 'img']
6+
ul-style:
7+
style: sublist
8+
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
line-length:
2+
line_length: 300
3+
no-inline-html:
4+
allowed_elements: ['p', 'img']
5+
ul-style:
6+
style: sublist
7+
no-duplicate-heading:
8+
siblings_only: true
9+
blanks-around-headings:
10+
lines_below: 0
11+
blanks-around-lists: false

.github/workflows/test.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,3 +96,21 @@ jobs:
9696
bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash)
9797
./actionlint
9898
./actionlint example_workflows/*.yaml
99+
100+
- name: Lint READMEs
101+
uses: DavidAnson/markdownlint-cli2-action@v19
102+
with:
103+
config: '.config/.markdownlint.jsonc'
104+
globs: '**/README.md'
105+
106+
- name: Lint CHANGELOG
107+
uses: DavidAnson/markdownlint-cli2-action@v19
108+
with:
109+
config: '.config/.markdownlint.jsonc'
110+
globs: 'CHANGELOG.md'
111+
112+
- name: Lint Other Markdown
113+
uses: DavidAnson/markdownlint-cli2-action@v19
114+
with:
115+
config: '.config/.markdownlint.jsonc'
116+
globs: 'docs/*.md'

0 commit comments

Comments
 (0)