Skip to content

Commit 8ce84d4

Browse files
authored
Add description for offline usage of markdown lints (#173)
1 parent e93c520 commit 8ce84d4

File tree

1 file changed

+24
-5
lines changed

1 file changed

+24
-5
lines changed

CONTRIBUTING.md

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,30 @@ Don't forget to add your new article to the `SUMMARY.md` to let it be rendered t
4040

4141
Please make `Draft Pull requests` early so we can follow your progress and can give early feedback (see the following section).
4242

43+
## Check the article locally
44+
45+
Before submitting the PR launch the commands `mdbook build` to make sure that the book builds and `mdbook test` to make sure that
46+
code examples are correct.
47+
48+
### Markdown lint
49+
50+
To make sure the files comply with our Markdown style we use [markdownlint-cli](https://github.com/igorshubovych/markdownlint-cli).
51+
To spare you some manual work to get through the CI test you can use the following commands to automatically fix most of the emerging problems when writing Markdown files.
52+
53+
- Install:
54+
55+
```sh
56+
npm install -g markdownlint-cli
57+
```
58+
59+
- Check all markdown files:
60+
- unix: `markdownlint '**/*.md'`
61+
- windows: `markdownlint **/*.md`
62+
63+
- Automatically fix basic errors:
64+
- unix: `markdownlint -f '**/*.md'`
65+
- windows: `markdownlint -f **/*.md`
66+
4367
## Creating a Pull Request
4468

4569
"Release early and often!" also applies to pull requests!
@@ -49,11 +73,6 @@ Early reviews of the community are not meant as an offense but to give feedback.
4973

5074
A good principle: "Work together, share ideas, teach others."
5175

52-
### Test the book locally before submitting
53-
54-
Before submitting the PR launch the commands `mdbook build` to make sure that the book builds and `mdbook test` to make sure that
55-
code examples are correct.
56-
5776
### Important Note
5877

5978
Please **don't force push** commits in your branch, in order to keep commit history and make it easier for us to see changes between reviews.

0 commit comments

Comments
 (0)