remcohaszing / remark-preset-wooorm

Personal markdown (and prose) style

Home Page:https://unifiedjs.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

remark-preset-wooorm

Build Downloads Size

My personal markdown (and prose) style.

Contents

What is this?

This is a preset for remark to check markdown. It’s used on all the readmes I work on.

When should I use this?

Feel free to use this. But you can also create your own personal style preset.

Install

This package is ESM only. In Node.js (version 14.14+, 16.0+), install with npm:

npm install remark-preset-wooorm

In Deno with esm.sh:

import remarkPresetWooorm from 'https://esm.sh/remark-preset-wooorm@9'

In browsers with esm.sh:

<script type="module">
  import remarkPresetWooorm from 'https://esm.sh/remark-preset-wooorm@9?bundle'
</script>

Use

import {remark} from 'remark'
import remarkPresetWooorm from 'remark-preset-wooorm'
import {reporter} from 'vfile-reporter'

const file = await remark()
  .use(remarkPresetWooorm)
  .process('This *and* _and_ that.')

console.error(reporter(file))

Yields:

        1:1  warning  Missing newline character at end of file  final-newline    remark-lint
   1:7-1:16  warning  Expected `and` once, not twice            and              retext-repeated-words
  1:12-1:17  warning  Emphasis should use `*` as a marker       emphasis-marker  remark-lint

⚠ 3 warnings

API

This package exports no identifiers. The default export is remarkPresetWooorm.

remarkPresetWooorm

Preset to support my personal markdown style.

Checks

Markdown
  • extends remark-preset-lint-recommended, and adds a strict code-style (see index.js)
  • checks broken local links
  • markdown is compiled with asterisks (*) for list-item bullets and emphasis, and fenced code blocks (note: set output: true in your config to benefit from this)
  • how remark compiles can be configured inline with comments
  • Contents headers are kept up to date, with a depth of 3 (if output: true)
  • GH references, like mentions or issue references, are linked (if output: true)
Natural language

See retext-preset-wooorm for more info.

Types

This package is fully typed with TypeScript. It exports no additional types.

Compatibility

This package is at least compatible with all maintained versions of Node.js. As of now, that is Node.js 14.14+ and 16.0+. It also works in Deno and modern browsers.

Related

Contribute

Yes please! See How to Contribute to Open Source.

License

MIT © Titus Wormer

About

Personal markdown (and prose) style

https://unifiedjs.com

License:MIT License


Languages

Language:JavaScript 100.0%