🎉 Book markdown and prose style.
npm:
npm install remark-cli remark-preset-survivejs --save
Now add the following to your package.json
:
"scripts": {
"build-md": "remark ."
"test": "npm run build-md && ..."
},
"remarkConfig": {
"plugins": ["preset-survivejs"]
},
From now on, npm test
also checks markdown.
npm test
- Extends
remark-preset-lint-recommended
, and adds a strict code-style (seeindex.js
); - Checks broken local links;
- Markdown is compiled with asterisk list-item bullets (
*
), and fenced code blocks (note: setoutput: true
in your config to benefit from this); - How remark compiles can be configured inline with comments;
Table of Contents
headers are kept up to date, with a depth of3
(ifoutput: true
);- GH references, like mentions or issue references, are
linked (if
output: true
).
- One [space][] between sentences;
- Checks “indefinite articles”: “a” or “an”;
- Checks accidental repeated words;
- Checks incorrectly placed apostrophes in contractions.