New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@novadiscovery/check-md

Package Overview
Dependencies
Maintainers
3
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@novadiscovery/check-md

Checks dead links of markdown

  • 1.0.1
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
2
Maintainers
3
Weekly downloads
 
Created
Source

check-md

NPM version build status Test coverage David deps Known Vulnerabilities NPM download

A simple cli for checking dead links of markdown.

Usage

$ npm i check-md --save
$ npx check-md

Options

Usage: check-md [options]

Options:
  -v, --version            output the version number
  -f, --fix                Check and try to fix
  -c, --cwd [path]         Working directory of check-md, default to process.cwd()
  -r, --root [path]        Checking url root, default to ./
  -p, --preset [name]      Preset config(eg vuepress, default)
  -P, --pattern [pattern]  Glob patterns, default to **/*.md
  -i, --ignore [pattern]   Ignore patterns, will merge to pattern, default to **/node_modules
  --exit-level [level]     Process exit level, default to error, other choice is warn and none, it will not exit if setting to none
  --default-index [index]  Default index in directory, default to README.md,readme.md
  -h, --help               output usage information

configure in package.json

{
  "check-md": {
    "cwd": "./",
    "defaultIndex": [ "index.md" ],
    "exitLevel": "warn",
  }
}

Example

Running cli in directory of test.md

The result is

Checking markdown...

1 warning was found

  Should use .md instead of .html: [test6](./other.html#ctx-get-name) (/Users/Workspace/check-md/test/fixtures/docs1/test.md:15:1)


5 dead links was found

  Url link is empty: [test1]() (/Users/Workspace/check-md/test/fixtures/docs1/test.md:5:5)
  Hash is not found: [test8](/other#cccc) (/Users/Workspace/check-md/test/fixtures/docs1/test.md:19:1)
  File is not found: [test9](/123.md#cccc) (/Users/Workspace/check-md/test/fixtures/docs1/test.md:21:1)
  Hash should slugify: [test12](./other.md#ctx.get(name) (/Users/Workspace/check-md/test/fixtures/docs1/test.md:27:1)
  File is not found: [test16](./123.md#ctx.get(name) (/Users/Workspace/check-md/test/fixtures/docs1/test.md:39:1)

Executes with --fix to fix automatically

Checking failed

FAQs

Package last updated on 02 Jul 2020

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