0.5.0 • Published 2 years ago

@svengreb/remark-preset-lint v0.5.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

This package implements the rules of the Sven Greb Markdown style guide as an extensible remark-lint rule preset. It supports all official core rules and various plugins like the “frontmatter” Markdown extension for YAML and TOML and “GitHub Flavoured” Markdown.

Getting Started

Note that this package uses npm version 7.7.0 or higher as the main package manager, but the documentations also include instructions to work with Yarn (classic / v1).

Installation

Add the package as development dependency to your project:

# With npm...
npm install --save-dev @svengreb/remark-preset-lint

# or Yarn.
yarn add --dev @svengreb/remark-preset-lint

Note that peer dependencies, like the remark-lint package itself, are only installed automatically when using a npm version equal or higher than 7.0.0, otherwise they must be installed separately like described in the peer dependencies section below. See the Node distribution index for more information about which npm version is bundled with which Node version.

Peer Dependencies

This package depends on various remark-lint rule packages that are defined as peer dependencies.

npm versions >=7.0.0

As of npm version 7.0.0, peer dependencies are installed automatically and does not require any additional steps.

npm versions >=5.0.0 <7.0.0

For npm version equal to or higher than 5.0.0 (pre-bundled with Node.js 8) but less than 7.0.0, all peer dependencies can be auto-installed using the pre-bundled npx package:

npx install-peerdeps --dev @svengreb/remark-preset-lint
npm versions <5.0.0

If you’re using a npm version less than 5.0.0, the npx package is not pre-bundled, but users can either simply install the npx package globally to run the above command or use the install-peerdeps helper package locally/globally to let it handle the installation of all peer dependencies:

# Install and use the "install-peerdeps" helper package locally...
npm install install-peerdeps
./node_modules/.bin/install-peerdeps --dev @svengreb/remark-preset-lint

# ...or globally.
npm install --global install-peerdeps
install-peerdeps --dev @svengreb/remark-preset-lint

To install all peer dependencies manually without npx or any helper package, the npm info command can be used to get a list of all packages and their versions:

# List the names and versions of all peer dependencies...
npm info "@svengreb/remark-preset-lint" peerDependencies

# ...and install each listed package manually.
npm install PACKAGE@VERSION
Using Yarn instead of npm

If you’re not using npm but Yarn, peer dependencies can be installed by either adding them manually or using the install-peerdeps helper package:

# Either add all packages manually by listing all required names and their versions and install them manually...
yarn info @svengreb/remark-preset-lint peerDependencies
yarn add --dev remark-lint #...

# ...or use the "install-peerdeps" helper package.
yarn add --dev install-peerdeps
yarn run install-peerdeps --dev @svengreb/remark-preset-lint

Usage

The package can be used as rule preset by adding it to the plugins within your .remarkrc.js or .remarkrc configuration file:

module.exports = {
  plugins: ["@svengreb/remark-preset-lint"],
};

Contributing

Please read the contribution guidelines of the Sven Greb Markdown style guide for more details.

remark-footnotesremark-frontmatterremark-gfmremark-lintremark-lint-blockquote-indentationremark-lint-checkbox-character-styleremark-lint-checkbox-content-indentremark-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-first-heading-levelremark-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-list-item-spacingremark-lint-maximum-heading-lengthremark-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-duplicate-headings-in-sectionremark-lint-no-emphasis-as-headingremark-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-heading-indentremark-lint-no-heading-like-paragraphremark-lint-no-heading-punctuationremark-lint-no-htmlremark-lint-no-inline-paddingremark-lint-no-literal-urlsremark-lint-no-missing-blank-linesremark-lint-no-multiple-toplevel-headingsremark-lint-no-paragraph-content-indentremark-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-unneeded-full-reference-imageremark-lint-no-unneeded-full-reference-linkremark-lint-no-unused-definitionsremark-lint-ordered-list-marker-styleremark-lint-ordered-list-marker-valueremark-lint-rule-styleremark-lint-strikethrough-markerremark-lint-strong-markerremark-lint-table-cell-paddingremark-lint-table-pipe-alignmentremark-lint-table-pipesremark-lint-unordered-list-marker-style
0.5.0

2 years ago

0.4.0

2 years ago