This package contains rules based on the GOV.UK Technical Style guide and is designed to work with the linting tool Vale. You can find more information about Vale on its website.
Errors raised by the linter will show for each file:
- the line and character number of the issue
- the severity level of the issue (error, warning, suggestion)
- a description of the issue
- the path to the rule that flagged the issue
To use the linter (Vale), you must provide a config file which describes where the rules for the linter are located. Confirm that a .vale.ini
exists at the root of your repo and that the url for the tech-docs-linter zip file is provided through the Packages
field. Here is a template config file for reference.
By default, Vale must be run from the same directory as this config file, unless the --config
flag is provide with a path.
- In a terminal window, navigate to your repo
- Run
vale sync
to download the latest tech-docs-linter package and unzip this to yourStylesPath
listed in your config file - Run the command
vale .
to lint the entire repo or provide a path to a directory to lint only that directory for example:vale source/new-starter-guide/*.erb
StylesPath = vale-styles
Packages = https://github.com/alphagov/tech-docs-linter/releases/latest/download/tech-writing-style-guide.zip
# Local Config
MinAlertLevel = error
[*.{md,org,txt,erb,html}]
BasedOnStyles = tech-writing-style-guide