Skip to content

Commit d8eaab4

Browse files
author
Michael Gasperini
committed
ci(docs): lint the public documentation
Add the shared markdownlint configuration and a Docs workflow that lints the README and the top-level community documents. Long-form docs/ trees keep their own structure and are not linted.
1 parent 93ff510 commit d8eaab4

2 files changed

Lines changed: 52 additions & 0 deletions

File tree

‎.github/workflows/docs.yml‎

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Docs
2+
3+
on:
4+
push:
5+
paths:
6+
- "**/*.md"
7+
- ".markdownlint-cli2.jsonc"
8+
- ".github/workflows/docs.yml"
9+
pull_request:
10+
paths:
11+
- "**/*.md"
12+
- ".markdownlint-cli2.jsonc"
13+
- ".github/workflows/docs.yml"
14+
workflow_dispatch:
15+
16+
permissions:
17+
contents: read
18+
19+
jobs:
20+
markdownlint:
21+
name: markdownlint
22+
runs-on: ubuntu-latest
23+
timeout-minutes: 5
24+
steps:
25+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
26+
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
27+
with:
28+
node-version: 24
29+
- run: npx --yes markdownlint-cli2@0.24.0 "README.md" "CONTRIBUTING.md" "SECURITY.md" "SUPPORT.md" "CODE_OF_CONDUCT.md"

‎.markdownlint-cli2.jsonc‎

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"config": {
3+
"default": true,
4+
"MD013": false,
5+
"MD024": { "siblings_only": true },
6+
"MD029": { "style": "ordered" },
7+
"MD033": {
8+
"allowed_elements": ["br", "details", "summary", "img", "p", "a", "div", "kbd", "sup", "sub", "table", "picture", "source"]
9+
},
10+
"MD034": false,
11+
"MD041": true,
12+
"MD060": false,
13+
"MD046": { "style": "fenced" },
14+
"MD048": { "style": "backtick" }
15+
},
16+
"ignores": [
17+
"node_modules/**", ".git/**", "dist/**", "build/**", "coverage/**", "vendor/**",
18+
"target/**", ".expo/**", "third_party/**", "third-party/**", "out/**", "bin/**",
19+
"media/**", "assets/**", "CHANGELOG.md", "*.lock", "package-lock.json"
20+
]
21+
}
22+
23+

0 commit comments

Comments
 (0)