retext-google-styleguide
Word usage guidence from Google Developer Documentation Style Guide.
retext-google-styleguide
is a retext plugin for the word usage advice from Google Developer Documentation Style Guide. It highlights errors and provide word usage advice.
Installation
npm:
npm install retext-google-styleguide
Usage
For the following file, example.txt
:
For 3-D rotation, abort the app first.Then hit autoupdate to update the app.
And our script, example.js
, looks as follows:
var vfile = ;var report = ;var retext = ;var googlestyleguide = ; ;
Yields:
example.txt 1:5-1:8 warning Do not use. Replace with “3D”. 3-d googlestyleguide 1:19-1:24 warning Do not use. Replace with “stop”, “exit”, “cancel”, “end”. abort googlestyleguide 2:6-2:9 warning Don't use as a synonym for "click." hit googlestyleguide 2:10-2:20 warning Do not use. Replace with “automatically update”. autoupdate googlestyleguide ⚠ 4 warnings
API
retext().use(googlestyleguide)
Rules
See index.json