Adds raw to the end of tokens, assuming both are defined.
ignorecase
bool
Makes all matches case-insensitive.
nonword
bool
Removes the default word boundaries (\b).
swap
map
A sequence of observed: expected pairs.
exceptions
array
An array of strings to be ignored.
vocab
bool
If false, disables all active vocabularies for this rule (default: true).
capitalize
bool
Matches the capitalization of the source token.
substitution associates a string with a preferred form.
yaml
Copy
extends: substitutionmessage: Consider using '%s' instead of '%s'level: warningignorecase: false# swap maps tokens in form of bad: goodswap: abundance: plenty accelerate: speed up
If we want to suggest the use of “plenty” instead of “abundance,” for example,
we’d write:
In some cases, you may want to suggest multiple alternatives for a single
token. You can do this by separating them with a pipe (”|”):
yaml
Copy
extends: substitution# NOTE: We don't quote the first '%s':message: Consider using %s instead of '%s.'level: warning# NOTE: The action is required.action: name: replaceswap: # You can suggest multiple alternatives for a single token # by separating them with a pipe ("|"). masterful: skilled|authoritative|commanding
In the CLI, this will render as a sentence with multiple suggestions:
In LSP-based editors, the suggestions will be presented as a list of
‘Quick Fixes’. See the LSP guide for more information.