Skip to content

Latest commit

 

History

History
59 lines (35 loc) · 2.46 KB

README.md

File metadata and controls

59 lines (35 loc) · 2.46 KB

Vale

Vale may be used from local copy of this repo and as GH action.

Set up Vale

https://passo.uno/posts/first-steps-with-the-vale-prose-linter/ provides a decent quickstart (but get install from main docs).

Vale commands for local linting

From the spelling directory (where the vale.ini file is held):

  1. {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.

Configure Vale

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:

  1. project-words

    Ignore files are case insensitive, and apply all permutations of the term (all cases).

  2. accept
  3. 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.

Vale and YAML

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.