retext-preset-wooorm v5.0.0
retext-preset-wooorm
My personal prose style.
Contents
What is this?
This is a preset for retext to check some prose. It’s used on all the readmes I work on.
When should I use this?
Feel free to use this. But you can also create your own personal style preset.
Install
This package is ESM only. In Node.js (version 16+), install with npm:
npm install retext-preset-wooorm
In Deno with esm.sh
:
import retextPresetWooorm from 'https://esm.sh/retext-preset-wooorm@5'
In browsers with esm.sh
:
<script type="module">
import retextPresetWooorm from 'https://esm.sh/retext-preset-wooorm@5?bundle'
</script>
Use
import {retext} from 'retext'
import retextPresetWooorm from 'retext-preset-wooorm'
import reporter from 'vfile-reporter'
const file = await retext()
.use(retextPresetWooorm)
.process('This and and that.')
console.error(reporter(file))
Yields:
1:6-1:13 warning Unexpected repeated `and`, remove one occurrence and retext-repeated-words
⚠ 1 warning
API
This package exports no identifiers.
The default export is retextPresetWooorm
.
unified().use(retextPresetWooorm)
Preset to support my personal prose style (Preset
).
Notes
- checks for a line ending between sentences
- 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
Types
This package is fully typed with TypeScript. It exports no additional types.
Compatibility
Projects maintained by me are compatible with maintained versions of Node.js.
When I cut a new major release, I drop support for unmaintained versions of
Node.
This means we try to keep the current release line, retext-preset-wooorm@^5
,
compatible with Node.js 16.
Related
remark-preset-wooorm
— personal markdown style
Contribute
Yes please! See How to Contribute to Open Source.
Security
This package is safe.