Socket
Socket
Sign inDemoInstall

remark-preset-lint-recommended

Package Overview
Dependencies
81
Maintainers
2
Versions
17
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    remark-preset-lint-recommended

remark preset to configure remark-lint with rules that prevent mistakes or stuff that fails across vendors.


Version published
Maintainers
2
Install size
2.35 MB
Created

Readme

Source

Build Coverage Downloads Size Sponsors Backers Chat

Preset of remark-lint rules to warn for some likely problems.

Contents

What is this?

This package is a unified (remark) preset, specifically consisting of remark-lint rules. Lint rules check markdown code style.

When should I use this?

You can use this package to check that markdown follows some best practices.

Rules

This preset configures remark-lint with the following rules:

RuleSetting
remark-lint-final-newline
remark-lint-list-item-bullet-indent
remark-lint-list-item-indent'tab-size'
remark-lint-no-blockquote-without-marker
remark-lint-no-literal-urls
remark-lint-ordered-list-marker-style'.'
remark-lint-hard-break-spaces
remark-lint-no-duplicate-definitions
remark-lint-no-heading-content-indent
remark-lint-no-inline-padding
remark-lint-no-shortcut-reference-image
remark-lint-no-shortcut-reference-link
remark-lint-no-undefined-references
remark-lint-no-unused-definitions

Install

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

npm install remark-preset-lint-recommended

In Deno with esm.sh:

import remarkPresetLintRecommended from 'https://esm.sh/remark-preset-lint-recommended@6'

In browsers with esm.sh:

<script type="module">
  import remarkPresetLintRecommended from 'https://esm.sh/remark-preset-lint-recommended@6?bundle'
</script>

Use

On the API:

import {read} from 'to-vfile'
import {reporter} from 'vfile-reporter'
import {remark} from 'remark'
import remarkPresetLintRecommended from 'remark-preset-lint-recommended'

main()

async function main() {
  const file = await remark()
    .use(remarkPresetLintRecommended)
    .process(await read('example.md'))

  console.error(reporter(file))
}

On the CLI:

remark --use remark-preset-lint-recommended example.md

On the CLI in a config file (here a package.json):

 …
 "remarkConfig": {
   "plugins": [
     …
+    "remark-preset-lint-recommended",
     …
   ]
 }
 …

API

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

unified().use(remarkPresetLintRecommended)

Use the preset. Presets don’t have options. You can reconfigure rules in them by using the afterwards with different options.

Compatibility

Projects maintained by the unified collective are compatible with all maintained versions of Node.js. As of now, that is Node.js 12.20+, 14.14+, and 16.0+. Our projects sometimes work with older versions, but this is not guaranteed.

Contribute

See contributing.md in remarkjs/.github for ways to get started. See support.md for ways to get help.

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

License

MIT © Titus Wormer

Keywords

FAQs

Last updated on 16 May 2023

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc