How to use remark-preset-lint-markdown-style-guide - 2 common examples

To help you get started, we’ve selected a few remark-preset-lint-markdown-style-guide examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github onflow / cadence / docs / generate.js View on Github external
function buildPipeline(target) {

  const base = unified()
    .use(markdown)
    .use(toc)
    .use(slug)
    .use(autolink)
    .use(validateLinks)
    .use({
      plugins: styleGuide.plugins.filter(elem => {
        if (!Array.isArray(elem))
          return elem;
        return elem[0].displayName !== 'remark-lint:list-item-indent'
      })
    })
    .use(highlight, makeHighlightOptions(target))
    .use(
      remark2retext,
      unified()
        .use(english)
        .use(indefiniteArticle)
        .use(repeatedWords)
    )

  switch (target) {
  case 'html':
github netdata / netdata / .remarkrc.js View on Github external
commonmark: true,
  looseTable: false,
  spacedTable: false,
  paddedTable: false,
  fences: true,
  rule: '-',
  ruleRepetition: 3,
  emphasis: "*",
  strong: "*",
  bullet: "-",
  listItemIndent: 'tab',
  incrementListMarker: true
};

const remarkPresetLintMarkdownStyleGuide = {
  plugins: require("remark-preset-lint-markdown-style-guide").plugins.filter(
    function(elem) {
      return elem != require("remark-lint-no-duplicate-headings");
    }
  )
};

exports.plugins = [
  require("remark-preset-lint-consistent"),
  require("remark-preset-lint-recommended"),
  remarkPresetLintMarkdownStyleGuide,
  [require("remark-lint-no-dead-urls"), { skipOffline: true }],
  require("remark-lint-heading-whitespace"),
  [require("remark-lint-maximum-line-length"), 120],
  [require("remark-lint-maximum-heading-length"), 120],
  [require("remark-lint-list-item-indent"), "tab-size"],
  [require("remark-lint-list-item-spacing"), false],

remark-preset-lint-markdown-style-guide

remark preset to configure remark-lint with rules that enforce the markdown style guide

MIT
Latest version published 8 months ago

Package Health Score

70 / 100
Full package analysis

Popular remark-preset-lint-markdown-style-guide functions