@@ -36,8 +36,8 @@ retext()
36
36
Yields:
37
37
38
38
``` txt
39
- 1:6-1:12 warning `useles` is misspelt; did you mean `useless`? retext-spell retext-spell
40
- 1:13-1:22 warning `documeant` is misspelt; did you mean `document`? retext-spell retext-spell
39
+ 1:6-1:12 warning `useles` is misspelt; did you mean `useless`? useles retext-spell
40
+ 1:13-1:22 warning `documeant` is misspelt; did you mean `document`? documeant retext-spell
41
41
42
42
⚠ 2 warnings
43
43
```
@@ -92,6 +92,27 @@ By default, up to thirty words are suggested for.
92
92
Further misspellings are still warned about, but without suggestions.
93
93
Increasing this number significantly impacts performance.
94
94
95
+ ### Messages
96
+
97
+ Each message is emitted as a [ ` VFileMessage ` ] [ message ] on ` file ` , with the
98
+ following fields:
99
+
100
+ ###### ` message.source `
101
+
102
+ Name of this plugin (` 'retext-spell' ` ).
103
+
104
+ ###### ` message.ruleId `
105
+
106
+ Normalized not ok word (` string ` , such as ` 'useles' ` ).
107
+
108
+ ###### ` message.actual `
109
+
110
+ Current not ok word (` string ` , such as ` 'Useles' ` ).
111
+
112
+ ###### ` message.expected `
113
+
114
+ List of suggestions of words to use (` Array.<string> ` , such as ` ['Useless'] ` ).
115
+
95
116
## Related
96
117
97
118
* [ ` retext-contractions ` ] ( https://github.com/retextjs/retext-contractions )
@@ -167,12 +188,14 @@ abide by its terms.
167
188
168
189
[ retext ] : https://github.com/retextjs/retext
169
190
191
+ [ message ] : https://github.com/vfile/vfile-message
192
+
193
+ [ literal ] : https://github.com/syntax-tree/nlcst-is-literal#isliteralparent-index
194
+
170
195
[ process ] : https://github.com/unifiedjs/unified#processorprocessfilevalue-done
171
196
172
197
[ dictionaries ] : https://github.com/wooorm/dictionaries
173
198
174
199
[ nspell ] : https://github.com/wooorm/nspell
175
200
176
- [ literal ] : https://github.com/syntax-tree/nlcst-is-literal#isliteralparent-index
177
-
178
201
[ personal ] : https://github.com/wooorm/nspell#personal-dictionary-documents
0 commit comments