Skip to content

📝 A syntax-aware linter for prose built with speed and extensibility in mind.

License

Notifications You must be signed in to change notification settings

ChrisChinchilla/vale

 
 

Repository files navigation

Vale: Your Style, Our Editor Build Status Build status Go Report Card release

🌟 We're now offering Integration Assistance! This is a great way to support the project while also getting the time-consuming tasks (e.g., creating a Vale-compatible version of your house style and setting up a CI service) out of the way. Shoot us an email for more information! 🌟

demo

Vale is a natural language linter that supports plain text, markup (Markdown, reStructuredText, AsciiDoc, and HTML), and source code comments. Vale doesn't attempt to offer a one-size-fits-all collection of rules—instead, it strives to make customization as easy as possible.

Check out project website to learn more!

Highlights

  • Supports Markdown, reStructuredText, AsciiDoc, HTML, and source code.
  • Extensible through straightforward YAML files.
  • Standalone binaries for Windows, macOS, and Linux.
  • Expressive, EditorConfig-like configuration.

Features

Vale's functionality is split into extension points (called "checks") that can be customized to perform many different kinds of tasks, including calculating readability, measuring sentence length, enforcing a particular heading style, and identifying undefined acronyms. See the Style Showcase for more advanced examples.

Additionally, since Vale is "syntax aware," you'll never have to worry about syntax-related false positives (e.g., URLs or code blocks). See Creating a style for more information.

Installation

There are a few options to choose from:

  • Homebrew:

    $ brew tap ValeLint/vale
    $ brew install vale
  • Chocolatey:

    C:\> choco install vale
  • A Windows Installer package (.msi), which you'll find on the releases page.

  • Manually on Windows, macOS, or Linux by downloading an executable from the releases page.

Usage

Run Vale on a single file:

$ vale README.md

Run Vale on files matching a particular glob:

# Only lint Markdown and reStructuredText
$ vale --glob='*.{md,rst}' directory

Or exclude files matching a particular glob:

# Ignore all `.txt` files
$ vale --glob='!*.txt' directory

Pipe input to Vale:

$ echo 'this is some very interesting text' | vale

Run Vale on text with an assigned syntax:

$ vale --ext=.md 'this is some `very` interesting text'

See vale --help and Configuration for more information.

Integrations

Reference Styles

Style (source) Download Description Development Status
Joblint Joblint.zip Test tech job posts for issues with sexism, culture, expectations, and recruiter fails.
proselint proselint.zip A linter for English prose that aggregates knowledge about best practices in writing.
write-good write-good.zip Naive linter for English prose for developers who can't write good and wanna learn to do other stuff good too.

To use one of these styles, you'd copy its files onto your StylesPath and then specify it in your config file:

# This goes in a file named either `.vale` or `_vale`.

StylesPath = path/to/some/directory
MinAlertLevel = warning # suggestion, warning or error

[*.{md,txt}] # Only Markdown and .txt files
# List of styles to load
BasedOnStyles = vale, Joblint
# Style.Rule = {YES, NO, suggestion, warning, error} to
# enable/disable a rule or change its level.
vale.Editorializing = NO

See Configuration and Styles for more information.

About

📝 A syntax-aware linter for prose built with speed and extensibility in mind.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 53.2%
  • Gherkin 30.7%
  • C++ 3.4%
  • HTML 3.4%
  • CSS 2.5%
  • Ruby 1.6%
  • Other 5.2%