mirror of
https://github.com/rust-unofficial/patterns
synced 2024-11-04 18:00:27 +00:00
Add description for offline usage of markdown lints (#173)
This commit is contained in:
parent
e93c52049c
commit
8ce84d4d64
@ -40,6 +40,30 @@ Don't forget to add your new article to the `SUMMARY.md` to let it be rendered t
|
||||
|
||||
Please make `Draft Pull requests` early so we can follow your progress and can give early feedback (see the following section).
|
||||
|
||||
## Check the article locally
|
||||
|
||||
Before submitting the PR launch the commands `mdbook build` to make sure that the book builds and `mdbook test` to make sure that
|
||||
code examples are correct.
|
||||
|
||||
### Markdown lint
|
||||
|
||||
To make sure the files comply with our Markdown style we use [markdownlint-cli](https://github.com/igorshubovych/markdownlint-cli).
|
||||
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.
|
||||
|
||||
- Install:
|
||||
|
||||
```sh
|
||||
npm install -g markdownlint-cli
|
||||
```
|
||||
|
||||
- Check all markdown files:
|
||||
- unix: `markdownlint '**/*.md'`
|
||||
- windows: `markdownlint **/*.md`
|
||||
|
||||
- Automatically fix basic errors:
|
||||
- unix: `markdownlint -f '**/*.md'`
|
||||
- windows: `markdownlint -f **/*.md`
|
||||
|
||||
## Creating a Pull Request
|
||||
|
||||
"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.
|
||||
|
||||
A good principle: "Work together, share ideas, teach others."
|
||||
|
||||
### Test the book locally before submitting
|
||||
|
||||
Before submitting the PR launch the commands `mdbook build` to make sure that the book builds and `mdbook test` to make sure that
|
||||
code examples are correct.
|
||||
|
||||
### Important Note
|
||||
|
||||
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.
|
||||
|
Loading…
Reference in New Issue
Block a user