Vale may be used from local copy of this repo and as GH action.
https://passo.uno/posts/first-steps-with-the-vale-prose-linter/ provides a decent quickstart (but get install from main docs).
From the spelling directory (where the vale.ini file is held):
- {Optional} Grab the to-date version of a style package referenced in the vale.ini with:
vale sync
Microsoft is sourced from https://github.com/errata-ai/Microsoft.
a) To run Vale against all relevant files in repo, use:
vale .
b) Or pass Vale the path to the file you want to lint, e.g. lint this file with:
vale README.md
You may configure Vale to work globally and locally or integrate it with VS Code.
Vale is highly customizable and the boilerplate styles may not be what you need. To override these with Consensys styles, you will probably update one of 3 locations:
- project-words
Ignore files are case insensitive, and apply all permutations of the term (all cases).
- accept
- reject
accept and reject use regex there is no need to create the reject case for each accept nor vice versa.
For help with Regex expression building use Regex101.
Finally, there are more nuanced Consensys-specific styles such as substitutions, acronym overrides, and other configurations in the Consensys Style folder.
The vale.ini file provides various switches to turn styles on and off and to set what file types are formatted. Furthermore, as part of the GHA, the downstream repos that use this can specify which folders Vale may lint.
Learn more about the Consensys Style.
In the strict sense vale doesn't parse yaml or json, however, there is a fall through case where it handles files (anything) as text. This is used with the vale-star.ini.