feat(lint): add vale-config skill

Covers Vale install and .vale.ini setup — StylesPath, built-in/
third-party/custom styles, BasedOnStyles activation. Setup half of
Vale support; vale-run (running/interpreting) is a separate skill.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FxG5T8EJDgkABXxuneuFfn
This commit is contained in:
2026-07-23 19:11:38 +00:00
parent 88888c42c4
commit e4abe23560
11 changed files with 172 additions and 0 deletions

View File

@@ -0,0 +1,78 @@
---
topic: configuration-reference
source_keys:
- context7-websites-vale-sh
---
## Core Settings
| Key | Type | Purpose |
|---|---|---|
| `StylesPath` | string | Path to all Vale-related resources (styles, dictionaries, vocab). |
| `Packages` | string[] | Packages to download and install via `vale sync`. |
| `Vocab` | string[] | Vocabularies to load. |
| `MinAlertLevel` | enum | Minimum severity to report: `suggestion`, `warning`, or `error`. |
| `IgnoredScopes` | enum | Inline-level HTML tags to ignore. |
| `SkippedScopes` | enum | Block-level HTML tags to ignore entirely. |
## Format Associations
Map an unrecognized extension onto a supported one so Vale lints it with the right parser — an extension-level substitution only, it does not add new file-type support:
```ini
[formats]
mdx = md
```
## Vocabularies
Reference a named vocabulary (a folder of accept/reject word lists under `StylesPath`) via `Vocab`, then apply styles per glob:
```ini
StylesPath = styles
Vocab = Blog
[*]
BasedOnStyles = Vale, MyStyle
```
## Local Overrides
A project can layer a local `.vale.ini` that overrides `StylesPath`, adds packages, and changes `BasedOnStyles` for a subset of files — local settings merge with or override the global ones:
```ini
StylesPath = localpath
Packages = write-good
[*.md]
BasedOnStyles = write-good
```
## Rule Header Fields
Individual rule YAML files (under a style's directory) support these header fields:
| Field | Required | Default | Purpose |
|---|---|---|---|
| `extends` | yes | — | Check this rule extends (e.g. `existence`). |
| `message` | yes | — | Message shown when triggered; supports `%s` formatting per check type. |
| `level` | no | `suggestion` | Severity: `suggestion`, `warning`, or `error`. |
| `scope` | no | `text` | Scope the rule applies to (e.g. `heading`). |
| `link` | no | — | URL with more info about the rule. |
| `limit` | no | — | Max number of triggers per file. |
| `vocab` | no | `true` | Set `false` to disable active vocabularies for this rule. |
## Checks
The underlying functions a rule's `extends` field can reference: `existence`, `substitution`, `occurrence`, `repetition`, `consistency`, `conditional`, `capitalization`, `metric`, `spelling`, `sequence`, `script`.
## Built-in Style
Vale ships with a default `Vale` style containing four rules, usable without `vale sync`:
- `Vale.Spelling` — spell-checks against Hunspell-compatible dictionaries in `<StylesPath>/config/dictionaries`.
- `Vale.Terms` — enforces the project's accepted vocabulary terms.
- `Vale.Avoid` — enforces the project's rejected vocabulary terms.
- `Vale.Repetition` — flags repeated words (e.g. "the the").