spelling
Learn about the spelling extension point.
custom
bool
Turn off the default filters for acronyms, abbreviations, and numbers.
filters
array
An array of patterns to ignore during spell checking.
ignore
array
Relative paths (from <StylesPath>/config/ignore) to files consisting of one word per line to ignore.
exceptions
array
An array of strings to be ignored.
dicpath
string
The location to look for .dic and .aff files. Can be absolute or relative to the StylesPath.
dictionaries
array
An array of dictionaries to load.
append
bool
Adds the array of dictionaries after the default Vale dictionary, instead of replacing it.
aff, dic
string
One dictionary as a pair of files, found on the StylesPath, used instead of dictionaries.
split
bool
Check the parts of an identifier rather than skipping it or checking it whole.
spelling implements spell checking based on Hunspell-compatible dictionaries.
# Uses the built-in dictionary and filters.
extends: spelling
message: "Did you really mean '%s'?"
level: errorTeh build runs on evrey push.
test.md:1:1:style.Spelling:Did you really mean 'Teh'?
test.md:1:19:style.Spelling:Did you really mean 'evrey'?By default, spelling includes a custom, open-source dictionary for American English.
Dictionaries
You may instead use the dictionaries key to list multiple custom dictionaries:
The spelling extension point will look for en_US.{dic,aff} and en_medical.{dic,aff} files in <StylesPath>/config/dictionaries.
You can also use the DICPATH environment variable or the dicpath key.
Filters
Vale comes with a set of built-in filters, as described in the table below:
[A-Z]{1}[a-z]+[A-Z]+\w+
Mixed-cased words (such as “MongoDB”).
[^a-zA-Z_']
Words containing non-word tokens (such as numbers).
[A-Z]+$
Upper-cased words.
You can also choose define you own filters either with or without the built-in ones enabled:
Identifiers
An identifier is neither a word nor a typo. Without split, the built-in filters skip a PascalCase or hyphenated token and check a camelCase or snake_case one whole, so a typo inside RecieveMessage passes and a correct receiveMessage is reported. With split: true, an identifier is taken apart at an underscore, a hyphen, a digit, and a change of case, and each part is checked and reported at its own position:
getHTTPResponse_v2 is get, HTTP, Response, and v. A part in all capitals or under three letters is not checked, so HTTP, Id, and v2 pass. A plain word is still reported whole, and a whole identifier that is in a dictionary or an ignore file passes without being split.
Ignore files
Ignore files are plain-text files that list words to be ignored during spell check (one case-insensitive entry per line). For example:
You can name these files anything you’d like and reference them relative to the active <StylesPath>/config/ignore directory.
A word from an ignore file is also a candidate when the rule suggests a spelling, placed ahead of a dictionary word it ties with.
See Vocabularies for information on rule-agnostic terminology lists.
Last updated