My personal markdown (and prose) style.
- What is this?
- When should I use this?
- Install
- Use
- API
- Checks
- Types
- Compatibility
- Related
- Contribute
- License
This is a preset for remark to check markdown. It’s used on all the readmes I work on.
Feel free to use this. But you can also create your own personal style preset.
This package is ESM only. In Node.js (version 14.14+, 16.0+), install with npm:
npm install remark-preset-wooorm
In Deno with esm.sh
:
import remarkPresetWooorm from 'https://esm.sh/remark-preset-wooorm@9'
In browsers with esm.sh
:
<script type="module">
import remarkPresetWooorm from 'https://esm.sh/remark-preset-wooorm@9?bundle'
</script>
import {remark} from 'remark'
import remarkPresetWooorm from 'remark-preset-wooorm'
import {reporter} from 'vfile-reporter'
const file = await remark()
.use(remarkPresetWooorm)
.process('This *and* _and_ that.')
console.error(reporter(file))
Yields:
1:1 warning Missing newline character at end of file final-newline remark-lint
1:7-1:16 warning Expected `and` once, not twice and retext-repeated-words
1:12-1:17 warning Emphasis should use `*` as a marker emphasis-marker remark-lint
⚠ 3 warnings
This package exports no identifiers.
The default export is remarkPresetWooorm
.
Preset to support my personal markdown style.
- extends
remark-preset-lint-recommended
, and adds a strict code-style (seeindex.js
) - checks broken local links
- markdown is compiled with asterisks (
*
) for list-item bullets and emphasis, and fenced code blocks (note: setoutput: true
in your config to benefit from this) - how remark compiles can be configured inline with comments
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
)
See retext-preset-wooorm
for more info.
- English parsing
- two spaces between sentences (but: prefer a line break instead!)
- checks “indefinite articles”: “a” or “an”
- checks quotes and apostrophes (
""
>“”
) - checks accidental repeated words
- checks diacritics
- checks redundant acronyms
- checks incorrectly placed apostrophes in contractions
This package is fully typed with TypeScript. It exports no additional types.
This package is at least compatible with all maintained versions of Node.js. As of now, that is Node.js 14.14+ and 16.0+. It also works in Deno and modern browsers.
retext-preset-wooorm
— personal markdown style
Yes please! See How to Contribute to Open Source.