npm

Check out our latest tech talk, "JavaScript Supply Chain Security" presented by VP of Security, Adam Baldwin.Watch it here »

retext-ibmstyleguide

1.0.1 • Public • Published

retext-ibmstyleguide

Word usage guidence for technical writers.

retext-ibmstyleguide is a retext plugin for the word usage advice in IBM style guide. It highlights errors and provide word usage advice.

Installation

npm:

npm install retext-ibmstyleguide

Usage

For the following file, example.txt:

You can utilize a shorter word.
Be advised, don’t do this.
That’s the appropriate thing to do.

And our script, example.js, looks as follows:

var vfile = require('to-vfile');
var report = require('vfile-reporter');
var retext = require('retext');
var ibmstyleguide = require('retext-ibmstyleguide');
 
retext()
  .use(ibmstyleguide)
  .process(vfile.readSync('example.txt'), function (err, file) {
    console.error(report(err || file));
  });

Yields:

   1:9-1:16  warning  utilize [v.] Replace with "use."               utilize  ibmstyleguide
  2:19-2:21  warning  do (a step) [v.] Use "complete" or "perform."  do       ibmstyleguide
  3:33-3:35  warning  do (a step) [v.] Use "complete" or "perform."  do       ibmstyleguide
 
⚠ 3 warnings
 

API

retext().use(ibmstyleguide)

Rules

See index.json

install

npm i retext-ibmstyleguide

Downloadsweekly downloads

7

version

1.0.1

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability