Browse Source

docs(public/subjects): add document on how to lint markdown files to keep consistency

pull/1589/head
eslopfer 2 years ago
parent
commit
3703c92b28
  1. 21
      subjects/README.md
  2. BIN
      subjects/double-tick-prettier.png
  3. BIN
      subjects/format-document-prettier.png
  4. BIN
      subjects/install-prettier.png

21
subjects/README.md

@ -0,0 +1,21 @@
### Format with Prettier
In order to have a consistent formatting for the markdown files, we use Prettier with the default settings.
### How to install
In VS Code, click on the extensions icon, and type Prettier. It should be the first result of the search. Click on install.
![](install-prettier.png)
### Usage
After installing it, one way of using it is to right click the view of the file you want to format and click on format document. If you have other formatters/linters installed, you will be prompted to select which one you want to use.
![](format-document-prettier.png)
An alternative way is to press `ctrl + shift + i`, but this might vary depending on your local settings.
When the document is formatted, you should be able to see the Prettier text with the double tick on the bottom right corner of your window as in the image. If you only see one, another way to run it is by clicking on the `Prettier` text.
![](double-tick-prettier.png)

BIN
subjects/double-tick-prettier.png

diff.bin_not_shown

After

Width:  |  Height:  |  Size: 1.5 KiB

BIN
subjects/format-document-prettier.png

diff.bin_not_shown

After

Width:  |  Height:  |  Size: 176 KiB

BIN
subjects/install-prettier.png

diff.bin_not_shown

After

Width:  |  Height:  |  Size: 136 KiB

Loading…
Cancel
Save