retext-intensify

retext plugin to check for weak and mitigating wording

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
retext-intensify
1506.2.0a year ago7 years agoMinified + gzip package size for retext-intensify in KB

Readme

retext-intensify
!Buildbuild-badgebuild !Coveragecoverage-badgecoverage !Downloadsdownloads-badgedownloads !Sizesize-badgesize !Sponsorssponsors-badgecollective !Backersbackers-badgecollective !Chatchat-badgechat
retextretext plugin to check for weak and mitigating wording.

Install

This package is ESM only: Node 12+ is needed to use it and it must be imported instead of required.
npm install retext-intensify
## Use

Say we have the following file, `example.txt`:

```txt
Some people say there are quite some
problems, apparently.

…and our script, example.js, looks as follows:
import {readSync} from 'to-vfile'
import {reporter} from 'vfile-reporter'
import {retext} from 'retext'
import retextIntensify from 'retext-intensify'

const file = readSync('example.txt')

retext()
  .use(retextIntensify)
  .process(file)
  .then((file) => {
    console.error(reporter(file))
  })

Yields:
example.txt
    1:1-1:5  warning  Don’t use `Some`, it’s vague or ambiguous       weasel  retext-intensify
  1:13-1:16  warning  Don’t use `say`, it lessens impact              hedge   retext-intensify
  1:27-1:32  warning  Don’t use `quite`, it’s vague or ambiguous      weasel  retext-intensify
  1:33-1:37  warning  Don’t use `some`, it’s vague or ambiguous       weasel  retext-intensify
  2:11-2:21  warning  Don’t use `apparently`, it doesn’t add meaning  filler  retext-intensify

⚠ 5 warnings

API

This package exports no identifiers. The default export is retextIntensify.

unified().use(retextIntensify[, options])

Check for weak and mitigating wording: weaselswiki-weasels, hedgeswiki-hedges, and fillerswiki-fillers.
options.ignore
Phrases not to warn about (Array.<string>).

Messages

Each message is emitted as a VFileMessagemessage on file, with the following fields:
message.source
Name of this plugin ('retext-intensify').
message.ruleId
Category of warning ('filler', 'hedge', or 'weasel')
message.actual
Current not ok phrase (string).
message.expected
Empty array to signal that actual should be removed ([]).

Related

— Check possible insensitive, inconsiderate language
— Check passive voice
— Check profane and vulgar wording
— List of profane words
— List of hedge words
— List of filler words
— List of weasel words

Contribute

See contributing.mdcontributing in retextjs/.githubhealth for ways to get started. See support.mdsupport for ways to get help.
This project has a code of conductcoc. By interacting with this repository, organization, or community you agree to abide by its terms.

License

MITlicense © Titus Wormerauthor