Skip to content

gaurav-nelson/retext-ibmstyleguide

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Word usage guidence for technical writers. (from the IBM style guide)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published