Skip to content

Repository files navigation

@dnd-mapp/config-markdown

push main npm version license

Shared markdownlint config for consistent Markdown style.

Requirements

  • Either markdownlint-cli2 0.23 or markdownlint-cli 0.49 is a peer dependency and must be installed in your project.
  • You only need the CLI you use. Both peer dependencies are optional.

Installation

Install the config with the CLI of your choice.

pnpm add -D markdownlint-cli2 @dnd-mapp/config-markdown
pnpm add -D markdownlint-cli @dnd-mapp/config-markdown

Usage

For markdownlint-cli2, extend the config from a .markdownlint-cli2.yaml file in your project root.

config:
    extends: "@dnd-mapp/config-markdown"

For markdownlint-cli, extend it from a .markdownlint.yaml file instead.

extends: "@dnd-mapp/config-markdown"

Rules that you set next to extends override the shared ones.

Available configs

Config Extends path Description
base @dnd-mapp/config-markdown/base The default config for any project

The package root, @dnd-mapp/config-markdown, resolves to base.

What base sets

The config enables every default rule of markdownlint and changes the following.

Rule Setting Description
MD007 indent: 4 Indents nested list items by 4 spaces
MD013 false Turns off the line length check for wrapped text
MD024 siblings_only: true Allows repeated headings under different parents
MD060 style: aligned Requires table pipes to line up

The config does not set globs or gitignore. These are options of markdownlint-cli2, so set them in your own .markdownlint-cli2.yaml file.

Changelog

Notable changes for consumers of this package are listed in the changelog.

Contributing

Contributions are welcome. See the contributing guide for details.

License

MIT © D&D Mapp

Releases

Contributors

Languages