Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

remark-lint-docusaurus-empty-lines-around-admonition-content

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

remark-lint-docusaurus-empty-lines-around-admonition-content

remark-lint rule to warn when an admonition does not have empty lines around its content

  • 0.2.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-75%
Maintainers
1
Weekly downloads
 
Created
Source

remark-lint-docusaurus-empty-lines-around-admonition-content

remark-lint rule to warn when an admonition does not have empty lines around its content.

Useful to prevent shooting yourself in the foot when using Docusaurus and Prettier (see Admonitions – Usage with Prettier).

Contents

What is this?

This package is a unified (remark) plugin, specifically a remark-lint rule.

Lint rules check markdown code style.

Install

This package is ESM only.

In Node.js (16.0+), install with npm:

npm install --save-dev remark-lint-docusaurus-empty-lines-around-admonition-content

Use

On the API:

import {read} from 'to-vfile'
import {reporter} from 'vfile-reporter'
import {remark} from 'remark'
import remarkLint from 'remark-lint'
import remarkLintDocusaurusEmptyLinesAroundAdmonitionContent from 'remark-lint-docusaurus-empty-lines-around-admonition-content'

main()

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

  console.error(reporter(file))
}

On the CLI:

remark --use remark-lint --use remark-lint-docusaurus-empty-lines-around-admonition-content example.md

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

 …
 "remarkConfig": {
   "plugins": [
     …
     "remark-lint",
+    "remark-lint-docusaurus-empty-lines-around-admonition-content",
     …
   ]
 }
 …

API

unified().use(remarkLintNoUnneededFullReferenceLink[, config])

This rule supports standard configuration that all remark lint rules accept (such as false to turn it off or [1, options] to configure it).

There are no options.

Examples

See test/test.md or run the test with npm test.

License

MIT © Riccardo Odone

Keywords

FAQs

Package last updated on 24 May 2023

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc