Skip to content

Commit 90a4208

Browse files
authored
doc: Add suggestWords example to README (#4169)
1 parent bc3346a commit 90a4208

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

packages/cspell-eslint-plugin/README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,10 +126,14 @@ words:
126126
- allowlist
127127
flagWords:
128128
- blacklist->allowlist
129+
suggestWords:
130+
- colour->color
129131
```
130132
131133
With this configuration, `blacklist` is flagged as forbidden and `allowlist` is the "preferred" suggestion. When `autoFix` is enabled, all instances of `blacklist` will be replaced with `allowlist`.
132134

135+
When spell checking, if `colour` is not in one of the dictionaries, then `color` will be offered as the preferred suggestion. `suggestWords` are used to provide preferred suggestions, but will not flag any words as incorrect.
136+
133137
CSpell will match case, but not word stems. `blacklist` and `Blacklist` will get replaced, but not `blacklists`.
134138

135139
## In Combination with CSpell
@@ -171,3 +175,5 @@ Brought to you by <a href="https://streetsidesoftware.com" title="Street Side So
171175
</p>
172176

173177
<!--- @@inject-end: ../../static/footer.md --->
178+
179+
<!--- cspell:ignore colour --->

0 commit comments

Comments
 (0)