Releases: errata-ai/vale
v3.12.0
🚀 New Feature: Views – Targeted Linting for Structured (YAML, JSON, TOML) and Source Code Files
We’re introducing Views, a new way to define custom, structured representations of your files—giving you fine-grained control over what gets linted and how.
Views allow you to extract specific content from structured data (like YAML, JSON, or TOML) and source code and apply scoped linting rules to just those sections.
🔍 What’s a View?
A View is a user-defined configuration that transforms a file into a set of named scopes. This enables you to lint only relevant parts of a file—such as metadata descriptions, comments, or docstrings—without affecting the rest.
Here's an example using an OpenAPI file:
openapi: 3.0.0
info:
title: sample API
description: Optional multiline or single-line description in [CommonMark](http://commonmark.org/help/) or HTML.
version: 0.1.9
servers:
- url: http://api.example.com/v1
description: Optional server description, e.g. Main (production) serrver
- url: http://staging-api.example.com
description: |
Optional server description, e.g.
Internal staging serrver for testing
- url: http://api.example.com/v2
description: Optional server description, e.g. Main (production) serrver
And here's a View that extracts title
, description
, and each server's description
:
# config/views/OpenAPI.yml
engine: dasel
scopes:
- name: title
expr: info.title
- expr: info.description
type: md
- expr: servers.all().description
type: md
type: md
indicates that the description
values are formatted are Markdown. We enable this be using the View
key in our .vale.ini
:
StylesPath = ../../styles
MinAlertLevel = suggestion
[API.yml]
BasedOnStyles = Vale
View = OpenAPI
See the documentation for more information.
Changelog
v3.11.2
v3.11.1
v3.11.0
This release adds support for linting front matter fields in Markdown, AsciiDoc, reStructuredText, MDX, and Org files.
There are 3 supported front matter types -- YAML, TOML, and JSON:
Each field is dynamically assigned its own scope, allowing you to write rules that target specific ones:
---
title: "My document"
description: "A short summary of the document's purpose."
author: "John Doe"
---
Using the example above, the generated scopes would be text.frontmatter.title
, text.frontmatter.description
, and text.frontmatter.author
.
A rule can then use these in its scope:
field:
extends: capitalization
message: "'%s' should be in title case"
level: warning
scope: text.frontmatter.title
Changelog
v3.10.0
This release introduces support for MDX (#841). See the documentation for more information.
Notably, it is no longer necessary to configure CommentDelimiters
or use a [formats]
association with Markdown.
Changelog
- 74f7480 chore(deps): bump github.com/expr-lang/expr from 1.16.9 to 1.17.0 (#985)
- 1bcb343 test: add MDX case with old configuration
- 4476a1e chore(deps): bump golang.org/x/net from 0.34.0 to 0.36.0 (#982)
- 32e40db refactor: fix golangci-lint
- 04a7039 fix: support non-expressions in
{...}
- bc79b15 refactor: clean up cmd execution
- 811d6c4 chore: install mdx2vast in CI
- 61c8d15 feat: add built-in support for MDX
v3.9.6
v3.9.5
v3.9.4
Changelog
- 0e23567 refactor: use default location when
dicpath
is not set - 992fddb refactor: restrict spell check to word bounded tokens
- 7edac53 fix: only use on-disk file extension for config-matching
- 00b5b09 fix: handle empty replacements (#950)
- e73f5cd chore: update go dependencies (#938)
- 75ff562 Introducing Vale Guru on Gurubase.io (#924)