Prose linting automatically scans API documentation for punctuation, spelling, grammar, and language-style problems. Unlike basic grammar checkers, prose linters support custom rules for organizational style, tone, branding, jargon, redundancy, clichés, and vocabulary. section 8.10
Deploy prose linting as an automated documentation-quality control:
- Store API guide documentation as Markdown in version control so pipeline jobs can inspect changes. section 8.10
- Add prose linting to pull-request merge criteria alongside API linting, breaking-change checks, and work-ticket validation. section 8.2
- Configure Vale with a project .vale.ini file, selected style packages, and file-specific rules. section 8.5.5
- Run the configured linter against the API documentation directory and inspect its workflow output before merging. section 8.5.5
Vale in a GitHub Actions review job
A project can configure Vale to use the Microsoft Writing Style Guide and apply Vale and Microsoft styles to Markdown files. A workflow step downloads Vale 2.15.4, installs it on the runner, synchronizes configured packages with `vale sync`, and lints `apis/docs` with the project configuration. Vale can also run through a dedicated GitHub Action. section 8.5.5
StylesPath = ./../.github/styles #1 MinAlertLevel = suggestion #2 Packages = Microsoft #3 [*.md] #4 BasedOnStyles = Vale, Microsoft #5
Inspect the compact .vale.ini example to see the styles path, alert threshold, Microsoft package, Markdown selector, and inherited styles. section 8.5.5
- name: Prose Linting
run: |
wget -nv
https://github.com/errata-ai/vale/releases/download/v2.15.4/
vale_2.15.4_Linux_64-bit.tar.gz
mkdir bin && tar -xvzf vale_2.15.4_Linux_64-bit.tar.gz -C bin
export PATH=./bin:"$PATH"
cd pr-branch/chapter8
vale sync --config=
'pr-branch/chapter8/.vale.ini' #1
vale pr-branch/chapter8/apis/docs
--config='pr-branch/chapter8/.vale.ini' #2
Inspect the workflow listing for the concrete installation, package synchronization, and documentation-linting commands. section 8.5.5
