unified

Project:retextjs/retext-intensify

Package:retext-intensify@4.0.0

  1. Dependencies:9·Dependents:6
  2. retext plugin to check for weak and mitigating wording
  1. unified 132
  2. plugin 88
  3. retext 33
  4. phrase 5
  5. simple 2
  6. simpler 2
  7. synonym 2
  8. alternative 2

retext-intensify

Build Coverage Downloads Size Sponsors Backers Chat

retext plugin to check for weak and mitigating wording.

Install

npm:

npm install retext-intensify

Use

Say we have the following file, example.txt:

Some people say there are quite some
problems, apparently.

…and our script, example.js, looks as follows:

var vfile = require('to-vfile')
var report = require('vfile-reporter')
var retext = require('retext')
var intensify = require('retext-intensify')

retext()
  .use(intensify)
  .process(vfile.readSync('example.txt'), function(err, file) {
    console.error(report(err || 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

retext().use(intensify[, options])

Check for weak and mitigating wording: weasels, hedges, and fillers.

options.ignore

Phrases not to warn about (Array.<string>).

Messages

Each message is emitted as a VFileMessage 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 ([]).

Contribute

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, organisation, or community you agree to abide by its terms.

License

MIT © Titus Wormer