1.0.0 • Published 6 months ago

@flex-development/remark-preset v1.0.0

Weekly downloads
-
License
BSD-3-Clause
Repository
github
Last release
6 months ago

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

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.

remark-directiveremark-frontmatterremark-gfmremark-githubremark-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-blockquote-without-markerremark-lint-no-consecutive-blank-linesremark-lint-no-duplicate-defined-urlsremark-lint-no-duplicate-definitionsremark-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-literal-urlsremark-lint-no-missing-blank-linesremark-lint-no-multiple-toplevel-headingsremark-lint-no-paragraph-content-indentremark-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-styleremark-validate-linksstring-width
1.0.0

6 months ago