Vale Linter

website·Indexed 37 days ago

https://vale.sh/

A customizable linter for prose that supports a wide variety of style guides and formats. Vale provides a standard library (Std) and compatible implementations of guides from Google, Microsoft, Red Hat, Salesforce, and Elastic. It features an Asset Explorer for managing views, filters, and templates for diverse content types including OpenAPI, Python docstrings, git commit messages, and MDX.

Tokens
28.8K
Snippets
129
Records
229
Agent score
73%

What's inside Vale

  1. Overview of Vale prose linter

    Vale is an open-source, command-line linter for prose that checks markup (Markdown, HTML, reStructuredText, AsciiDoc, etc.) against style guides expressed as rules. It runs offline as a single binary and does not send text to external servers. It is designed to be unopinionated, meaning it ships with almost no rules; users instead apply styles from providers like Microsoft, Google, and Red Hat, or write their own.
  2. Overview of Vale CMS

    Vale CMS is a hosted authoring layer and MCP (Model Context Protocol) server built on top of the open-source Vale engine. It provides a browser-based editor for writing, testing, and shipping style guide rules directly to GitHub or GitLab repositories. Unlike the Vale CLI, which is used for enforcement in CI/CD pipelines, Vale CMS is designed for the authoring and validation phase of rule creation.
  3. Overview of Vale CMS

    Vale CMS is a hosted authoring layer for Vale projects. It provides a browser-based editor for managing configurations, rules, vocabularies, dictionaries, filters, and templates. Unlike a standard text editor, Vale CMS runs the Vale engine in real-time to lint every keystroke, ensuring that rules compile and fire as expected before they are shipped to a repository. It complements the free, open-source Vale CLI used in CI pipelines.
  4. Enforce scientific manuscript structure and content rules

    The Journals package provides a set of Vale rules to ensure scientific manuscripts adhere to standard conventions (like IMRaD) and specific journal guidelines (e.g., Nature, PLOS ONE). These rules check for the existence of required sections, proper formatting of citations and figures, and the inclusion of mandatory reporting elements in Methods, Results, and Discussion sections.
  5. Use the Journals Vale package for scientific papers

    The Journals Vale package is designed for linting scientific papers. It incorporates general journal conventions, specific author guidelines for Nature and PLOS ONE, and standardized reporting checklists including CONSORT, STROBE, and PRISMA, which are applied section by section.
  6. Apply targeted Vale rules using document scopes

    Vale parses document markup to identify structural scopes, allowing you to apply different linting checks to specific elements such as headings, lists, and table cells. This ensures that prose is checked while technical elements—such as code blocks and link URLs—are automatically skipped to avoid false positives.
  7. Lint non-markup files using TextFSM templates

    Vale can lint any file with a consistent shape and no markup (such as subtitle files, transcripts, changelogs, and .po files) by using the TextFSM template language to define the structure.
  8. Detect AI-written prose fingerprints with ai-tells

    The ai-tells package provides 134 rules that identify common AI writing patterns, such as absolute assertions, abstraction subjects, and verb tricolons. Unlike standard linters, these rules provide messages that suggest specific fixes rather than just flagging the phrase. The package includes the ai-tells-agent.tmpl template to assist in the detection process.
  9. Understand Vale's cross-syntax rule application

    Vale uses dedicated parsers for different markup languages (e.g., goldmark for Markdown, Asciidoctor for AsciiDoc, Docutils for reStructuredText). These parsers extract the prose and hand it to the linter in a consistent format. This allows a single rule to be written once and fire across multiple markup languages without needing to account for the specific syntax of each language.
  10. Identify and fix AI-written prose fingerprints with ai-tells rules

    The ai-tells package provides a set of Vale rules designed to flag common fingerprints of AI-generated text. These rules identify patterns such as absolute assertions, abstraction subjects, and overused figurative language, providing specific suggestions to make the prose more concrete and human-like.
  11. Use tree-sitter for precise comment extraction

    Vale uses tree-sitter to parse source files and run queries against the parse tree to identify comments. This ensures that comment delimiters inside string literals are correctly ignored and not treated as actual comments, avoiding the pitfalls of simple pattern-matching extractors.
    (comment) @comment
  12. Understand and configure Vale Views

    A View is a YAML file located in the styles directory that defines how Vale extracts prose from a file. It specifies an engine to parse the content and a list of scopes. Each scope is a query the engine evaluates; the results become blocks of text associated with that scope's name, positioned at the original line and column. To apply a View to specific files, use the View key in the .vale.ini configuration file under the relevant file-pattern section.