retext plugin to check for weak and mitigating wording.
- What is this?
- When should I use this?
- Install
- Use
- API
- Messages
- Types
- Compatibility
- Related
- Contribute
- License
This package is a unified (retext) plugin to check for words that are weak: weasels, hedges, and fillers.
You can opt-into this plugin when you’re dealing with content that might contain vague wording, and have authors that can fix that content.
This package is ESM only. In Node.js (version 16+), install with npm:
npm install retext-intensify
In Deno with esm.sh
:
import retextIntensify from 'https://esm.sh/retext-intensify@7'
In browsers with esm.sh
:
<script type="module">
import retextIntensify from 'https://esm.sh/retext-intensify@7?bundle'
</script>
Say our document example.txt
contains:
Some people say there are quite some
problems, apparently.
…and our module example.js
contains:
import {retext} from 'retext'
import retextIntensify from 'retext-intensify'
import {read} from 'to-vfile'
import {reporter} from 'vfile-reporter'
const file = await retext()
.use(retextIntensify)
.process(await read('example.txt'))
console.error(reporter(file))
…then running node example.js
yields:
example.txt
1:1-1:5 warning Unexpected weasel (vague or ambiguous) word `Some` weasel retext-intensify
1:13-1:16 warning Unexpected hedge (uncertain or indecisive) word `say` hedge retext-intensify
1:27-1:32 warning Unexpected weasel (vague or ambiguous) word `quite` weasel retext-intensify
1:33-1:37 warning Unexpected weasel (vague or ambiguous) word `some` weasel retext-intensify
2:11-2:21 warning Unexpected filler (meaningless) word `apparently` filler retext-intensify
⚠ 5 warnings
This package exports no identifiers.
The default export is retextIntensify
.
Check for weak and mitigating wording.
options
(Options
, optional) — configuration
Transform (Transformer
).
Configuration (TypeScript type).
ignore
(Array<string>
, optional) — phrases not to warn about
Each message is emitted as a VFileMessage
on file
, with
source
set to 'retext-intensify'
, ruleId
to 'filler'
, 'hedge'
, or
'weasel'
, actual
to the unexpected phrase, and expected
to an empty
array.
This package is fully typed with TypeScript.
It exports the additional type Options
.
Projects maintained by the unified collective are compatible with maintained versions of Node.js.
When we cut a new major release, we drop support for unmaintained versions of
Node.
This means we try to keep the current release line, retext-intensify@^7
,
compatible with Node.js 16.
retext-equality
— check possible insensitive, inconsiderate languageretext-passive
— check passive voiceretext-profanities
— check profane and vulgar wordingprofanities
— list of profane wordshedges
— list of hedge wordsfillers
— list of filler wordsweasels
— list of weasel words
See contributing.md
in retextjs/.github
for ways
to get started.
See support.md
for ways to get help.
This project has a code of conduct. By interacting with this repository, organization, or community you agree to abide by its terms.