retext-ibmstyleguide
v1.0.1
Published
Word usage guidence for technical writers. (from the IBM style guide)
Downloads
4
Maintainers
Readme
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