From 97548bd60e8fed11b7940402cc822cdc9d2870e3 Mon Sep 17 00:00:00 2001 From: Guy Sartorelli Date: Fri, 10 Nov 2023 10:17:16 +1300 Subject: [PATCH] DOC Document linting documentation --- en/05_Contributing/02_Documentation.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/en/05_Contributing/02_Documentation.md b/en/05_Contributing/02_Documentation.md index 4aa83b525..84eb9deef 100644 --- a/en/05_Contributing/02_Documentation.md +++ b/en/05_Contributing/02_Documentation.md @@ -72,6 +72,26 @@ Once you've made the pull request, make sure the pull request follows the guidel If you prefer to edit content on your local machine, follow the instructions on the [contributing code](code) page, since editing documentation on your computer follows that same process. +### Linting locally + +When you submit your pull request, the documentation will be automatically linted. You may want to run this process locally. To do so, you'll need to have both [Composer](https://getcomposer.org/download/) and Yarn installed. See [client-side build tooling](/contributing/build_tooling/#installation) for yarn installation instructions. + +You can then run the following commands from the command line to lint the documentation: + +```bash +yarn install +composer install +yarn lint +``` + +If there are linting issues, you may find the output easier to work with by running the separate types of linting individually. You can find the commands for those inside the `package.json` file. + +You can also fix any automatically fixable problems by passing the `--fix` option to the lint command. + +```bash +yarn lint --fix +``` + ## Writing style - Write in second person form, addressing the reader. For example "First you'll install a webserver" is good style.