Skip to content

markdownlint for 3.1.1.md #4041

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Aug 26, 2024
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
4 changes: 3 additions & 1 deletion .github/workflows/validate-markdown.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,12 @@ jobs:
fetch-depth: 0
- name: use the javascript environment from main
run: |
git checkout remotes/origin/main -- package.json package-lock.json
git checkout remotes/origin/main -- package.json package-lock.json .markdownlint.yaml
- uses: actions/setup-node@v4 # setup Node.js
with:
node-version: '20.x'
- name: Validate markdown
run: npx --yes mdv versions/3.*.md
- name: Lint markdown v3.1.1
run: npx --yes markdownlint-cli --config .markdownlint.yaml versions/3.1.1.md

16 changes: 16 additions & 0 deletions .markdownlint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Unordered list symbol
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you need this file if you are going to pull the .markdownlint.yaml from main? Or we could just commit the same version of .markdownlint.yaml in the root directory in all the branches -- that might be simpler.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

validate-markdown.yaml pulls package.json and package-lock.json from main, most likely to make sure that the same version of mdv is used across all branches, so it makes sense to also use the same linter ruleset across all branches.

The "branch-local" copy of .markdownlint.yaml allows formatting the current spec markdown locally.

MD004:
style: asterisk

# Unordered list indentation
MD007:
indent: 2

MD012: false # allow blank lines

MD013:
line_length: 800
tables: false

MD024: false # duplicate headings
MD033: false # inline HTML
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,8 @@
"Swagger",
"schema",
"API"
]
],
"scripts": {
"format-markdown": "npx prettier --write --single-quote versions/3.1.1.md && npx --yes markdownlint-cli --fix --config .markdownlint.yaml versions/3.1.1.md"
}
}