remark-preset-stoicism
v0.0.2
Published
Markdown processor for the Stoicism Compendium
Readme
remark-preset-stoicism
Markdown processor for the Stoicism Compendium.
This is a remark preset defining a number of warnings.
Each of these plugins is configured to emit a warning for the issue mentioned:
| Plugin | Issue |
| --------------------------------------------------- | ------------------------------------------------------- |
| remark-lint-blockquote-indentation | Block quote indentation spaces ≠ 2 |
| remark-lint-checkbox-character-style | Check box not x for checked, for unchecked |
| remark-lint-code-block-style | Code block not fenced |
| remark-lint-definition-case | Definitions not lowercase |
| remark-lint-definition-spacing | Consecutive spaces in definitions |
| remark-lint-emphasis-marker | Emphasis marker not _ |
| remark-lint-fenced-code-flag | Fenced code flag not provided |
| remark-lint-fenced-code-marker | Fenced code marker not ``` |
| remark-lint-file-extension | File name without extension .md |
| remark-lint-final-definition | Definitions not at end of file |
| remark-lint-final-newline | Missing \n at end of file |
| remark-lint-hard-break-spaces | Spaces for a hard line break > 2 |
| remark-lint-heading-increment | Heading level increments > 1 |
| remark-lint-heading-style | Heading not ATX |
| remark-lint-linebreak-style | End-of-line character not \n (as in Unix) |
| remark-lint-link-title-style | Link title not using " |
| remark-lint-list-item-bullet-indent | Indented list item bullets |
| remark-lint-list-item-content-indent | Mixed indentation in list item content |
| remark-lint-list-item-indent | Spaces after list bullet ≠ 1 |
| remark-lint-maximum-line-length | Lines longer than 80 characters |
| remark-lint-no-auto-link-without-protocol | Autolinks without protocol |
| remark-lint-no-blockquote-without-marker | Blank lines without > in block quote |
| remark-lint-no-consecutive-blank-lines | Consecutive blank lines |
| remark-lint-no-duplicate-defined-urls | Duplicate definition URLs |
| remark-lint-no-duplicate-definitions | Duplicate definitions |
| remark-lint-no-duplicate-headings | Duplicate headings |
| remark-lint-no-empty-url | Empty URLs |
| remark-lint-no-file-name-articles | File name starts with an article |
| remark-lint-no-file-name-consecutive-dashes | File name contains consecutive dashes |
| remark-lint-no-file-name-irregular-characters | File name contains “irregular” characters |
| remark-lint-no-file-name-mixed-case | File name uses mixed uppercase and lowercase characters |
| remark-lint-no-file-name-outer-dashes | File name contains initial or final dashes |
| remark-lint-no-heading-content-indent | Indented heading text |
| remark-lint-no-inline-padding | Padded content for emphasis, strong, etc. |
| remark-lint-no-literal-urls | Literal URLs |
| remark-lint-no-multiple-toplevel-headings | Level 1 headings (#) > 1 |
| remark-lint-no-reference-like-url | References match URLs |
| remark-lint-no-shell-dollars | Shell code starts with $ |
| remark-lint-no-shortcut-reference-image | Shortcut reference images |
| remark-lint-no-shortcut-reference-link | Shortcut reference links |
| remark-lint-no-table-indentation | Indented tables |
| remark-lint-no-tabs | Tabs used for indentation |
| remark-lint-no-undefined-references | References to undefined definitions |
| remark-lint-no-unused-definitions | Unused definitions |
| remark-lint-ordered-list-marker-style | Ordered list marker not using . |
| remark-lint-ordered-list-marker-value | Ordered lists with non-incrementing marker values |
| remark-lint-rule-style | Rule style not --- |
| remark-lint-strong-marker | Strong emphasis marker not * |
| remark-lint-table-cell-padding | Table cell not padded |
| remark-lint-table-pipe-alignment | Unaligned tables |
| remark-lint-table-pipes | Table row not fenced with pipes |
| remark-lint-unordered-list-marker-style | Unordered list marker not * |
| remark-validate-links | Invalid link or image to local files and headings |
These plugins were considered and rejected:
| Plugin | Issue |
| ---------------------------------------- | ---------------------------------------------------------------------------- |
| remark-lint-maximum-heading-length | Headings too long. We don’t want to put a limit on headings. |
| remark-lint-no-emphasis-as-heading | Emphasis or strong emphasis used as heading. Sometimes, that’s what we want. |
| remark-lint-no-heading-punctuation | Heading ends with punctuation. We sometimes want punctuation. |
We also use remark-retext with retext-preset-stoicism for text
warnings and spellchecking.
Prerequisites
In the following sections, we describe how to install remark-preset-stoicism
with npm and how to use it with remark to check and
format Markdown files.
Alternatives include yarn instead of npm.
Installation
Install remark-preset-stoicism and other dependencies as a development
dependency:
npm install --save-dev \
remark-preset-stoicism \
remark-cliUsage
Configuration
Create a file called .remark.js:
exports.plugins = [require('remark-preset-stoicism')]Script
Define scripts in your package.json to run remark on your
Markdown files:
"scripts": {
"check-md": "remark --quiet --frail .",
"format-md": "remark --quiet --frail --output ."
}Run the scripts with npm run:
npm run check-md
npm run format-md