Skip to content

Commit

Permalink
Add docs for messages
Browse files Browse the repository at this point in the history
  • Loading branch information
wooorm committed Jun 6, 2019
1 parent 1099830 commit 385e948
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,27 @@ Check for passive voice.

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

### Messages

Each message is emitted as a [`VFileMessage`][message] on `file`, with the
following fields:

###### `message.source`

Name of this plugin (`'retext-passive'`).

###### `message.ruleId`

Any word in [`list.json`][list].

###### `message.actual`

Current not ok phrase (`string`).

###### `message.expected`

Empty array to signal that `actual` should be removed (`[]`).

## Related

* [`retext-equality`](https://github.com/retextjs/retext-equality)
Expand Down Expand Up @@ -131,3 +152,7 @@ abide by its terms.
[author]: https://wooorm.com

[retext]: https://github.com/retextjs/retext

[message]: https://github.com/vfile/vfile-message

[list]: list.json

0 comments on commit 385e948

Please sign in to comment.