📝 A syntax-aware linter for prose built with speed and extensibility in mind.
Branch: master
Clone or download
Latest commit 677bfa2 Feb 19, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github chore: re-introduce ISSUE_TEMPLATE.md Jan 17, 2019
check refactor: ignore all-caps words in 'capitalization' Feb 5, 2019
core feat: add `SkippedScopes` and 'blockquote' Jan 14, 2019
data chore: update dictionary Sep 21, 2018
docs docs: remove HTML from snippet Feb 9, 2019
features fix: DenzienLabels -> DenizenLabels Feb 3, 2019
fixtures fix: construct a temporary context for link-scoped text Jan 21, 2019
lint fix: handle extended info strings Feb 7, 2019
rule fix: DenzienLabels -> DenizenLabels Feb 3, 2019
styles test: fix the order of `misc/Spelling` Nov 12, 2018
ui refactor: update import paths Apr 18, 2018
vendor feat: add `Spelling` Jan 26, 2018
.gitattributes test: add line endings fixtures Feb 7, 2017
.gitignore chore: add Python-related ignores Feb 4, 2019
.travis.yml refactor: build extension point examples from source Feb 4, 2019
.vale.ini chore: Replace 'misspell' with Vale Nov 9, 2018
Dockerfile chore: install dependencies in Docker Oct 15, 2018
Gemfile chore: specify versions for all gems Feb 21, 2017
Gemfile.lock chore: specify versions for all gems Feb 21, 2017
Gopkg.lock feat: add `Spelling` Jan 26, 2018
Gopkg.toml feat: add `Spelling` Jan 26, 2018
LICENSE chore: update license Jan 3, 2019
Makefile fix: DenzienLabels -> DenizenLabels Feb 3, 2019
README.md docs: fix badge formatting Feb 20, 2019
appveyor.yml chore: only run `make spell` on Travis CI Nov 9, 2018
cucumber.yml chore: add project Feb 5, 2017
goreleaser.yml chore: another Docker fix ... Oct 15, 2018
main.go refactor: only show missing config warning for CLI output Jan 25, 2019
wix.json chore: add go-msi to AppVeyor May 1, 2017

README.md

Vale: Your Style, Our Editor Build Status Go Report Card downloads Thanks

🌟 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 or setting up a CI service) out of the way.

vale-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 or our blog post to learn more!

Installation

There are a few options to choose from:

  • Homebrew (macOS):

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

    $ go get github.com/errata-ai/vale
  • Docker:

    $ docker pull jdkato/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.

Plugins for other software

Usage

Using the built-in styles

Vale ships with styles for proselint, write-good, and Joblint. The benefits of using these styles over their original implementations include:

  • Improved support for markup, including the ability to ignore code and target only certain sections of text (e.g., checking headers for a specific capitalization style).
  • No need to install and configure npm (Node.js), pip (Python), or other language-specific tools. With Vale, you get all the functionality in a single, standalone binary available for Windows, macOS, and Linux.
  • Easily combine, mismatch, or otherwise customize each style.

To use one of these styles, you'll need to create a config file alone the lines of the following:

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

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

# Only Markdown and .txt files; change to whatever you're using.
[*.{md,txt}]
# List of styles to load.
BasedOnStyles = proselint, write-good, Joblint
# Style.Rule = {YES, NO, suggestion, warning, error} to
# enable/disable a rule or change its level.
write-good.E-Prime = NO

See Getting Started for more information.

Creating your own style

While the built-in styles are useful, Vale is really designed to meet custom needs. This is done by using Vale's extension points (called "checks") that can be customized to perform many different kinds of tasks, including calculating readability, measuring sentence length, and enforcing a particular heading style.

See the vale-boilerplate project for a complete example of a Vale-compatible style guide.

Using the CLI

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 Usage for more information.

Say thanks

Hi!

My name is Joseph Kato.

In my spare time, I develop and maintain a few open-source tools for collaborative writing.

If you'd like to support my work, you can donate via Square's Cash App or make use of my documentation-related consulting services. Alternatively, I'd greatly appreciate a simple note explaining how you're using my software (which you can send via the 'Say Thanks' project).

I appreciate the support! Thank you!