0.0.2 • Published 4 years ago

remark-preset-stoicism v0.0.2

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

remark-preset-stoicism

test

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:

PluginIssue
remark-lint-blockquote-indentationBlock quote indentation spaces ≠ 2
remark-lint-checkbox-character-styleCheck box not x for checked, for unchecked
remark-lint-code-block-styleCode block not fenced
remark-lint-definition-caseDefinitions not lowercase
remark-lint-definition-spacingConsecutive spaces in definitions
remark-lint-emphasis-markerEmphasis marker not _
remark-lint-fenced-code-flagFenced code flag not provided
remark-lint-fenced-code-markerFenced code marker not ```
remark-lint-file-extensionFile name without extension .md
remark-lint-final-definitionDefinitions not at end of file
remark-lint-final-newlineMissing \n at end of file
remark-lint-hard-break-spacesSpaces for a hard line break > 2
remark-lint-heading-incrementHeading level increments > 1
remark-lint-heading-styleHeading not ATX
remark-lint-linebreak-styleEnd-of-line character not \n (as in Unix)
remark-lint-link-title-styleLink title not using "
remark-lint-list-item-bullet-indentIndented list item bullets
remark-lint-list-item-content-indentMixed indentation in list item content
remark-lint-list-item-indentSpaces after list bullet ≠ 1
remark-lint-maximum-line-lengthLines longer than 80 characters
remark-lint-no-auto-link-without-protocolAutolinks without protocol
remark-lint-no-blockquote-without-markerBlank lines without > in block quote
remark-lint-no-consecutive-blank-linesConsecutive blank lines
remark-lint-no-duplicate-defined-urlsDuplicate definition URLs
remark-lint-no-duplicate-definitionsDuplicate definitions
remark-lint-no-duplicate-headingsDuplicate headings
remark-lint-no-empty-urlEmpty URLs
remark-lint-no-file-name-articlesFile name starts with an article
remark-lint-no-file-name-consecutive-dashesFile name contains consecutive dashes
remark-lint-no-file-name-irregular-charactersFile name contains “irregular” characters
remark-lint-no-file-name-mixed-caseFile name uses mixed uppercase and lowercase characters
remark-lint-no-file-name-outer-dashesFile name contains initial or final dashes
remark-lint-no-heading-content-indentIndented heading text
remark-lint-no-inline-paddingPadded content for emphasis, strong, etc.
remark-lint-no-literal-urlsLiteral URLs
remark-lint-no-multiple-toplevel-headingsLevel 1 headings (#) > 1
remark-lint-no-reference-like-urlReferences match URLs
remark-lint-no-shell-dollarsShell code starts with $
remark-lint-no-shortcut-reference-imageShortcut reference images
remark-lint-no-shortcut-reference-linkShortcut reference links
remark-lint-no-table-indentationIndented tables
remark-lint-no-tabsTabs used for indentation
remark-lint-no-undefined-referencesReferences to undefined definitions
remark-lint-no-unused-definitionsUnused definitions
remark-lint-ordered-list-marker-styleOrdered list marker not using .
remark-lint-ordered-list-marker-valueOrdered lists with non-incrementing marker values
remark-lint-rule-styleRule style not ---
remark-lint-strong-markerStrong emphasis marker not *
remark-lint-table-cell-paddingTable cell not padded
remark-lint-table-pipe-alignmentUnaligned tables
remark-lint-table-pipesTable row not fenced with pipes
remark-lint-unordered-list-marker-styleUnordered list marker not *
remark-validate-linksInvalid link or image to local files and headings

These plugins were considered and rejected:

PluginIssue
remark-lint-maximum-heading-lengthHeadings too long. We don’t want to put a limit on headings.
remark-lint-no-emphasis-as-headingEmphasis or strong emphasis used as heading. Sometimes, that’s what we want.
remark-lint-no-heading-punctuationHeading 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-cli

Usage

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

License

Blue Oak Model License 1.0.0 © Sean Leather

remark-frontmatterremark-lint-blockquote-indentationremark-lint-checkbox-character-styleremark-lint-code-block-styleremark-lint-definition-caseremark-lint-definition-spacingremark-lint-emphasis-markerremark-lint-fenced-code-flagremark-lint-fenced-code-markerremark-lint-file-extensionremark-lint-final-definitionremark-lint-final-newlineremark-lint-hard-break-spacesremark-lint-heading-incrementremark-lint-heading-styleremark-lint-linebreak-styleremark-lint-link-title-styleremark-lint-list-item-bullet-indentremark-lint-list-item-content-indentremark-lint-list-item-indentremark-lint-maximum-line-lengthremark-lint-no-auto-link-without-protocolremark-lint-no-blockquote-without-markerremark-lint-no-consecutive-blank-linesremark-lint-no-duplicate-defined-urlsremark-lint-no-duplicate-definitionsremark-lint-no-duplicate-headingsremark-lint-no-empty-urlremark-lint-no-file-name-articlesremark-lint-no-file-name-consecutive-dashesremark-lint-no-file-name-irregular-charactersremark-lint-no-file-name-mixed-caseremark-lint-no-file-name-outer-dashesremark-lint-no-heading-content-indentremark-lint-no-inline-paddingremark-lint-no-literal-urlsremark-lint-no-multiple-toplevel-headingsremark-lint-no-reference-like-urlremark-lint-no-shell-dollarsremark-lint-no-shortcut-reference-imageremark-lint-no-shortcut-reference-linkremark-lint-no-table-indentationremark-lint-no-tabsremark-lint-no-undefined-referencesremark-lint-no-unused-definitionsremark-lint-ordered-list-marker-styleremark-lint-ordered-list-marker-valueremark-lint-rule-styleremark-lint-strong-markerremark-lint-table-cell-paddingremark-lint-table-pipe-alignmentremark-lint-table-pipesremark-lint-unordered-list-marker-styleremark-retextremark-validate-linksretext-preset-stoicismunified
0.0.2

4 years ago

0.0.1

4 years ago