Danger

Danger title image

prosea project from orta therox, Juanito Fatas and and others.

prose

Lint markdown files inside your projects. This is done using the proselint python egg. Results are passed out as a table in markdown.

Created by David Grandinetti, Orta Therox.

Reference

Attributes

Allows you to disable a collection of linters from running. Doesn't work yet. You can get a list of them here defaults to ["misc.scare_quotes", "typography.symbols"] when it's nil.

disable_lintersArray

Allows you to add a collection of words to skip in spellchecking. defaults to [""] when it's nil.

ignored_wordsArray

Methods

Lints the globbed markdown files. Will fail if proselint cannot be installed correctly. Generates a markdown list of warnings for the prose in a corpus of .markdown and .md files.

lint_files (files=nil: String)

Determine if proselint is currently installed in the system paths.

proselint_installed? Bool

Determine if mdspell is currently installed in the system paths.

mdspell_installed? Bool

Runs a markdown-specific spell checker, against a corpus of .markdown and .md files.

check_spelling (files=nil: String)

Examples

Running linter with custom disabled linters

# Runs a linter with comma style and tense present disabled
prose.disable_linters = ["misc.scare_quotes", "misc.tense_present"]
prose.lint_files "_posts/*.md"

Running linter with default linters

# Runs a linter with all styles, on modified and added markdown files in this PR
prose.lint_files

Running the spell checker

# Runs a spell checker on all files in `_post`
prose.check_spelling "_posts/*.md"

Running the spell checker, with some words whitelisted

prose.ignored_words = ["orta", "artsy"]
prose.check_spelling

How to Install

Include gem "danger-prose" in your project’s Gemfile. Then run bundle install.

Then inside your Dangerfile, you can access the plugin via prose.

Tags

blogging, blog, writing, jekyll, middleman, hugo, metalsmith, gatsby, express

Repository

See in Action