Skip to content

Commit

Permalink
doc: Add suggestWords example to README (#4169)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jason3S authored Feb 14, 2023
1 parent bc3346a commit 90a4208
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/cspell-eslint-plugin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,14 @@ words:
- allowlist
flagWords:
- blacklist->allowlist
suggestWords:
- colour->color
```
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`.

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.

CSpell will match case, but not word stems. `blacklist` and `Blacklist` will get replaced, but not `blacklists`.

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

<!--- @@inject-end: ../../static/footer.md --->

<!--- cspell:ignore colour --->

0 comments on commit 90a4208

Please sign in to comment.