Skip to content

flex-development/remark-preset

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

remark-preset

github release npm license conventional commits typescript yarn

flex development (fldv) markdown style.

Contents

What is this?

This is a preset for remark to check markdown.

Install

This package is ESM only.

In Node.js with yarn:

yarn add -D @flex-development/remark-preset
See Git - Protocols | Yarn  for details regarding installing from Git.

In Deno with esm.sh:

import remarkPresetFlex from 'https://esm.sh/@flex-development/remark-preset'

In browsers with esm.sh:

<script type="module">
  import remarkPresetFlex from 'https://esm.sh/@flex-development/remark-preset'
</script>

Use

import remarkPresetFlex from '@flex-development/remark-preset'
import { remark } from 'remark'
import { reporter } from 'vfile-reporter'

/**
 * @import {VFile} from 'vfile'
 */

/**
 * The processed file.
 *
 * @type {VFile}
 * @const file
 */
const file = await remark()
  .use(remarkPresetFlex)
  .process('This *and* _that_.')

console.error(reporter(file))

Yields:

1:12-1:18 warning Unexpected emphasis marker `_`, expected `*`                                         emphasis-marker remark-lint
1:19      warning Unexpected missing final newline character, expected line feed (`\n`) at end of file final-newline   remark-lint

⚠ 2 warnings

API

The default export is remarkPresetFlex.

No identifiers or TypeScript types are exported.

remarkPresetFlex

(Preset) A unified preset to encapsulate fldv markdown style.

Contribute

See CONTRIBUTING.md.

This project has a code of conduct. By interacting with this repository, organization, or community you agree to abide by its terms.