Learn about the primary component of Vale's configuration system.
Vale has a powerful extension system that doesn’t require knowledge of
any programming language. Instead, it uses collections of individual YAML files (or “rules”) to enforce particular writing
constructs.
yaml
Copy
# An example rule from the "Microsoft" style.extends: existencemessage: "Don't use end punctuation in headings."link: https://docs.microsoft.com/en-us/style-guide/punctuation/periodsnonword: truelevel: warningscope: headingaction: name: edit params: - remove - '.?!'tokens: - '[a-z0-9][.?!](?:s|$)'
These collections are referred to as styles and are organized in a
nested folder structure at a user-specified location. For example,
Each rule extends a specific check, which is a built-in function that
performs a particular task. For example, the existence check ensures that
a given pattern is present in the content.
Many rules will require the use of regular expressions to match specific
patterns in your content. Vale uses a superset of Go’s regexp/syntax package to provide a powerful and flexible regex engine.
In addition to the standard Go regex syntax, Vale also supports positive
lookahead ((?=re)), negative lookahead ((?!re)), positive lookbehind
((?<=re)), and negative lookbehind ((?<!re)).