wooorm / retext-preset-wooorm

Personal prose style

Home Page:https://unifiedjs.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

retext-preset-wooorm

Build Downloads Size

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

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

Contribute

Yes please! See How to Contribute to Open Source.

Security

This package is safe.

License

MIT © Titus Wormer

About

Personal prose style

https://unifiedjs.com

License:MIT License


Languages

Language:JavaScript 100.0%