This repository was archived by the owner on Aug 8, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 5 files changed +49
-1
lines changed
Expand file tree Collapse file tree 5 files changed +49
-1
lines changed Original file line number Diff line number Diff line change 1+ 2.4.4
2+ - Adds markdown linting
132.4.3
24 - Add eslint rule + doc entry regarding trailing commas
352.4.2
Original file line number Diff line number Diff line change @@ -36,3 +36,7 @@ Our Client Services team's [CSS Style Guide](/css/Readme.md). Written with a lot
3636
3737See the ` python ` directory of this repo for a standardized ` pylintrc ` file and
3838instructions on using ` pep8 ` , ` pylint ` and ` pyflakes ` to check Python code.
39+
40+ ## Documentation
41+
42+ See the [ ` docs ` ] ( docs ) directory for setup and configuration of Markdown linting.
Original file line number Diff line number Diff line change 1+ #! /bin/bash -eu
2+ # Lint markdown files using Mobify's .remarkrc configuration.
3+
4+ # FIXME: Brittle :|
5+ BIN_DIR=$( cd " $( dirname " ${BASH_SOURCE[0]} " ) " && pwd)
6+ CODE_STYLE_DIR=" $BIN_DIR /../mobify-code-style"
7+ REMARK_RC=" $CODE_STYLE_DIR /.remarkrc"
8+ REMARK_CLI=" $CODE_STYLE_DIR /node_modules/.bin/remark"
9+
10+ $REMARK_CLI --rc-path $REMARK_RC " $@ "
Original file line number Diff line number Diff line change 1+ > Write great documentation! – * [ _ Mobify Developer Values_ ] ( https://github.com/mobify/developer-values#️-write-great-documentation )
2+
3+ At Mobify, documentation is written in markdown.
4+
5+ Documentation should live as close as possible to the code it documents.
6+ Typically, this means including it in a ` docs ` folder at the root of the repo.
7+ Customer facing documentation should be published to a sub path of
8+ docs.mobify.com.
9+
10+ To make writing document easier, we provide:
11+
12+ * A linter for consistent markdown style.
13+ * A writing checklist for consistent process.
14+
15+ ### Markdown Linting
16+
17+ ``` bash
18+ npm install --save mobify-code-style
19+
20+ # 🏃 the linter markdown files in the `docs` folder:
21+ ./node_modules/.bin/lint-md docs
22+
23+ # Arguments are passed to `remark-cli`: https://github.com/wooorm/remark/tree/master/packages/remark-cli
24+ ./node_modules/.bin/lint-md --watch docs
25+
26+ # Try to automajically fix linting warnings:
27+ ./node_modules/.bin/lint-md --output docs
28+ ```
29+
130### Writing Checklist
231
332** Before you start writing**
Original file line number Diff line number Diff line change 1111 "bugs" : {
1212 "url" : " https://github.com/mobify/mobify-code-style/issues"
1313 },
14+ "bin" : {
15+ "lint-md" : " ./bin/lint-md"
16+ },
1417 "homepage" : " https://github.com/mobify/mobify-code-style" ,
1518 "scripts" : {
1619 "test" : " bash docs/test/test.sh"
2023 "remark-lint" : " 5.0.1" ,
2124 "remark-preset-lint-recommended" : " 1.0.0"
2225 }
23- }
26+ }
You can’t perform that action at this time.
0 commit comments