retext-preset-stoicism
Text processor for the Stoicism Compendium.
This is a retext preset defining a number of warnings.
These are the warnings.
Each of the plugins is configured to emit a warning for the issue mentioned:
| Plugin | Issue |
|---|---|
retext-contractions |
Incorrect apostrophes in contractions |
retext-diacritics |
Incorrect diacritics |
retext-indefinite-article |
Incorrect indefinite articles |
retext-quotes |
“Straight” quotes and apostrophes instead of “smart” |
retext-redundant-acronyms |
Redundant acronyms |
retext-repeated-words |
Repeated words |
retext-sentence-spacing |
Number 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