0.0.1 • Published 4 years ago

retext-preset-stoicism v0.0.1

Weekly downloads
13
License
BlueOak-1.0.0
Repository
github
Last release
4 years ago

retext-preset-stoicism

test

Text processor for the Stoicism Compendium.

This is a retext preset defining a number of warnings.

Each of the plugins is configured to emit a warning for the issue mentioned:

PluginIssue
retext-contractionsIncorrect apostrophes in contractions
retext-diacriticsIncorrect diacritics
retext-indefinite-articleIncorrect indefinite articles
retext-quotes“Straight” quotes and apostrophes instead of “smart”
retext-redundant-acronymsRedundant acronyms
retext-repeated-wordsRepeated words
retext-sentence-spacingNumber of spaces between sentences ≠ 1

retext-preset-stoicism is used by remark-preset-stoicism to check Markdown text in the Stoicism Compendium.

Prerequisites

In the following sections, we describe how to install retext-preset-stoicism with npm and how to use it with remark to check Markdown files.

Alternatives include yarn instead of npm.

Installation

Install retext-preset-stoicism and other dependencies as a development dependency:

npm install --save-dev \
  retext-preset-stoicism \
  remark-cli \
  remark-retext \
  unified

Usage

Configuration

Create a file called .remark.js:

exports.plugins = [
  [
    require('remark-retext'),
    require('unified')().use(require('retext-preset-stoicism')),
  ]
]

See remark-preset-stoicism for how retext-preset-stoicism is used along with a number of other remark plugins and settings.

Script

Define a script in your package.json to run remark on your Markdown files:

"scripts": {
  "check-md": "remark --quiet --frail ."
}

Run the script with npm run:

npm run check-md

License

Blue Oak Model License 1.0.0 © Sean Leather