npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

markdownlint-rule-extra-fixes

v0.4.2

Published

Custom markdownlint rules that add fixInfo for MD040 and other rules the core does not fix

Readme

markdownlint-rule-extra-fixes

Custom markdownlint rules that provide fixInfo for rules the core does not auto-fix. Use with markdownlint-cli2 --fix to apply fixes.

Install

Install markdownlint-cli2 (if not already in your project) and the plugin using one of the options below.

From npm (when the package is published):

npm install markdownlint-cli2 markdownlint-rule-extra-fixes
# or: yarn add / pnpm add

Locally (same repo / monorepo)
No install step: point customRules at the package path. In .markdownlint-cli2.jsonc at the repo root:

"customRules": ["./packages/markdownlint-rule-extra-fixes"]

Paths are resolved from the config file’s directory. No npm install of the plugin is required.

From a Git repo (internal or public)
Install directly from the repository URL. Replace with your org/repo and optional branch/tag:

# npm (repo root = this package)
npm install markdownlint-cli2 markdownlint-rule-extra-fixes@git+https://gitlab.cee.redhat.com/your-org/markdownlint-fix.git#main

# npm (monorepo: package in subdirectory — use ?subdir=)
npm install markdownlint-cli2 'markdownlint-rule-extra-fixes@git+https://gitlab.cee.redhat.com/your-org/markdownlint-fix.git#main?subdir=packages/markdownlint-rule-extra-fixes'

# yarn
yarn add markdownlint-cli2 'markdownlint-rule-extra-fixes@git+https://gitlab.cee.redhat.com/your-org/markdownlint-fix.git#main'

# pnpm
pnpm add markdownlint-cli2 'markdownlint-rule-extra-fixes@git+https://gitlab.cee.redhat.com/your-org/markdownlint-fix.git#main'

Use #branch, #tag, or #commit in place of #main as needed. For a private repo, ensure your environment has access (e.g. SSH key, token, or .npmrc auth).

Alternative (any package manager): clone the repo and install from the local path:

git clone https://gitlab.cee.redhat.com/your-org/markdownlint-fix.git
cd your-project
npm install markdownlint-cli2 ./markdownlint-fix/packages/markdownlint-rule-extra-fixes

Then use the package name markdownlint-rule-extra-fixes in customRules as usual.

Usage

Add the package to customRules in your markdownlint config (e.g. .markdownlint-cli2.jsonc):

{
  "config": { ... },
  "customRules": [ "markdownlint-rule-extra-fixes" ]
}

Then run:

npx markdownlint-cli2 --fix "**/*.md"

Fixes from these rules are applied together with markdownlint's built-in fixes. Disable the corresponding built-in rule when using a -fix rule to avoid duplicate violations.

Rules

| Rule | Description | Config | |------------|-------------|--------| | MD013-fix | Line length. Wraps paragraphs, list items, blockquotes. | line_length (default: 80) | | MD033-fix | No inline HTML. Converts common tags to markdown, wraps rest in backticks. | convert_elements, quote_remaining_as_code | | MD036-fix | Emphasis as heading. Converts a line that is only **Bold** / *Italic* into a heading. | heading_level (default: 2) | | MD040-fix | Fenced code language. Inserts default or inferred language after opening fence. | default_language, infer_language | | MD041-fix | First line heading. Prepends a top-level heading when missing. | default_heading (default: "Document") | | MD042-fix | No empty links. Replaces empty ]( ) / ](#) with a URL. | url_placeholder (default: "fixme_url") | | MD047-fix | Trailing newline. Ensures file ends with a single newline. | — |

Config example

{
  "config": {
    "MD040": false,
    "MD040-fix": {
      "default_language": "text",
      "infer_language": true
    },
    "MD041": false,
    "MD041-fix": { "default_heading": "Document" },
    "MD042": false,
    "MD042-fix": { "url_placeholder": "fixme_url" },
    "MD036": false,
    "MD036-fix": { "heading_level": 2 },
    "MD033": false,
    "MD033-fix": { "quote_remaining_as_code": true },
    "MD013": false,
    "MD013-fix": { "line_length": 80 },
    "MD047": false,
    "MD047-fix": true
  },
  "customRules": [ "markdownlint-rule-extra-fixes" ]
}

Development

From the package directory:

npm install
npm test

Related