Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 0 additions & 19 deletions .github/config/.markdownlint-cli2.yaml

This file was deleted.

8 changes: 7 additions & 1 deletion .github/workflows/reusable-markdown-lint-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ jobs:
steps:
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0

- uses: jdx/mise-action@9dc7d5dd454262207dea3ab5a06a3df6afc8ff26 # v3.4.1

- name: Run markdownlint
run: |
npx [email protected] --config .github/config/.markdownlint-cli2.yaml "**/*.md"
if ! mise run lint:markdown; then
echo "markdownlint failed. To auto-fix many issues locally, run:"
echo " mise run lint:markdown --fix"
exit 1
fi
13 changes: 13 additions & 0 deletions .markdownlint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# See https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md
# and https://github.com/DavidAnson/markdownlint-cli2

ul-style: false
line-length: false
no-duplicate-heading:
siblings_only: true
ol-prefix:
style: ordered
no-inline-html: false
fenced-code-language: false
no-trailing-punctuation:
punctuation: ".,;:" # allowing exclamation points and question marks at end of sentences
11 changes: 11 additions & 0 deletions .mise/tasks/lint/markdown.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/usr/bin/env bash
#MISE description="Lint markdown files"
#MISE flag "--fix" help="Automatically fix issues"

set -e

if [ "${usage_fix}" = "true" ]; then
markdownlint-cli2 --fix "**/*.md" "#**/build" "#CHANGELOG.md" "#licenses/licenses.md"
else
markdownlint-cli2 "**/*.md" "#**/build" "#CHANGELOG.md" "#licenses/licenses.md"
fi
1 change: 1 addition & 0 deletions mise.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[tools]
lychee = "0.21.0"
markdownlint-cli2 = "0.17.1"

[settings]
# Only install tools explicitly defined in the [tools] section above
Expand Down
Loading