Use this file to discover all available pages before exploring further.
Vale uses a style-based architecture to organize rules (also called “checks”). A style is a collection of individual rules stored as YAML files, allowing you to maintain reusable rule sets for different writing standards.
Vale provides 12 extension points that define how rules match and evaluate text. Each rule file must declare which extension point it uses via the extends key.
existence
substitution
occurrence
repetition
consistency
conditional
capitalization
readability
spelling
sequence
metric
script
Checks for the presence of specific words or patterns.
extends: existencemessage: "Avoid using '%s'"level: errortokens: - obviously - simply - just
Use existence when you want to flag specific terms, phrases, or patterns. The rule triggers whenever any token is found in the text.Key attributes:
tokens: List of terms to search for
ignorecase: Whether to ignore case (default: true)
nonword: Match anywhere, not just word boundaries
exceptions: Terms to ignore even if they match
Suggests replacements for matched text.
extends: substitutionmessage: "Use '%s' instead of '%s'"level: warningswap: utilize: use leverage: use prior to: before
The substitution extension swaps keys for values, finding the key pattern and suggesting the value as a replacement.Key attributes:
swap: Map of patterns to replacements
ignorecase: Whether to ignore case
capitalize: Preserve original capitalization
nonword: Match anywhere in text
Counts occurrences of a token against min/max thresholds.
extends: occurrencemessage: "More than 3 commas in a sentence"level: suggestionscope: sentencetoken: ','max: 3
Use occurrence to enforce limits on repetitive elements like commas, exclamation points, or word counts.Key attributes:
token: Regular expression to match
max: Maximum allowed occurrences
min: Minimum required occurrences
scope: Where to apply the count
Detects repeated words or phrases.
extends: repetitionmessage: "'%s' is repeated"level: errorignorecase: truealpha: truetokens: - '[^\s]+'
The repetition extension finds consecutive duplicate tokens, useful for catching unintentional word repetition.Key attributes:
tokens: Patterns defining what counts as a token
alpha: Only check alphabetic tokens
ignorecase: Whether to ignore case
Enforces consistent usage between variants.
extends: consistencymessage: "Inconsistent spelling of '%s'"level: erroreither: center: centre color: colour analyze: analyse
Use consistency when either variant is acceptable, but you want consistent usage throughout a document.Key attributes:
either: Map of variant pairs
ignorecase: Whether to ignore case
Ensures one pattern implies another.
extends: conditionalmessage: "'%s' has no definition"level: errorfirst: '\b([A-Z]{3,5})\b'second: '([A-Z]{3,5}): (?:\b[A-Z][a-z]+ )+'exceptions: - API - HTTP
The conditional extension ensures that using an abbreviation (first) requires a definition (second) somewhere in the file.Key attributes:
first: The trigger pattern (antecedent)
second: The required pattern (consequent)
exceptions: Patterns to exclude
Checks capitalization style.
extends: capitalizationmessage: "'%s' should be in title case"level: warningmatch: $titlestyle: APexceptions: - API - GitHub
The capitalization extension supports multiple styles:
$title: Title case (AP or Chicago style)
$sentence: Sentence case
$lower: All lowercase
$upper: All uppercase
Key attributes:
match: Capitalization pattern to check
style: “AP” or “Chicago” (for title case)
exceptions: Terms to ignore
threshold: Proportion of words that must match (0-1)
Calculates readability scores.
extends: readabilitymessage: "Grade level (%s) too high"level: warninggrade: 8metrics: - Flesch-Kincaid - Gunning Fog
The readability extension evaluates text complexity using established readability formulas.Available metrics:
Flesch-Kincaid Grade Level
Gunning Fog Index
Coleman-Liau Index
Automated Readability Index
SMOG
Checks spelling against dictionaries.
extends: spellingmessage: "'%s' is misspelled"level: errordictionaries: - en_USignore: - custom-terms.txt
The spelling extension integrates with Hunspell dictionaries and supports custom word lists.Key attributes:
dictionaries: Dictionary names to use
ignore: Files containing terms to ignore
filters: Regular expressions to skip
Matches sequences of parts-of-speech.
extends: sequencemessage: "Use 'by using' instead of '%s'"level: warningtokens: - tag: NN - pattern: using
The sequence extension uses part-of-speech tagging to match grammatical patterns.Key attributes:
The metric extension lets you create custom formulas using document statistics like word count, sentence count, and heading counts.Available variables: