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

markdownlint

Package Overview
Dependencies
Maintainers
1
Versions
70
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

markdownlint

A Node.js style checker and lint tool for Markdown/CommonMark files.

  • 0.27.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
622K
decreased by-4.47%
Maintainers
1
Weekly downloads
 
Created

What is markdownlint?

markdownlint is a Node.js package that provides a linter for Markdown files. It helps ensure that Markdown files adhere to a consistent style and are free from common errors. The package can be used programmatically or via the command line, and it supports custom rules and configurations.

What are markdownlint's main functionalities?

Linting Markdown Files

This feature allows you to lint Markdown files to ensure they follow specified rules. The code sample demonstrates how to lint a file named 'README.md' with a custom configuration that disables the 'MD013' rule.

const markdownlint = require('markdownlint');
const options = {
  files: [ 'README.md' ],
  config: {
    'default': true,
    'MD013': false
  }
};
markdownlint(options, function callback(err, result) {
  if (!err) {
    console.log(result.toString());
  }
});

Custom Rules

This feature allows you to define and use custom rules for linting. The code sample shows how to include custom rules from a file named 'custom-rules.js' and apply them to 'README.md'.

const markdownlint = require('markdownlint');
const customRules = require('./custom-rules');
const options = {
  files: [ 'README.md' ],
  customRules: customRules
};
markdownlint(options, function callback(err, result) {
  if (!err) {
    console.log(result.toString());
  }
});

Command Line Interface

markdownlint can be used via the command line to lint files. The code sample demonstrates how to lint 'README.md' using a configuration file named '.markdownlint.json'.

markdownlint README.md --config .markdownlint.json

Other packages similar to markdownlint

Keywords

FAQs

Package last updated on 28 Dec 2022

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