Socket
Socket
Sign inDemoInstall

markdownlint-cli2-formatter-json

Package Overview
Dependencies
1
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

markdownlint-cli2-formatter-json


Version published
Maintainers
1
Created

Changelog

Source

0.0.7

  • Support .markdownlint-cli2.js and .markdownlint.js

Readme

Source

markdownlint-cli2-formatter-json

An output formatter for markdownlint-cli2 that writes results to a file in JSON format

npm version License

Install

npm install markdownlint-cli2-formatter-json --save-dev

Use

For the default output file name of "markdownlint-cli2-results.json", use the following .markdownlint-cli2.jsonc:

{
  "outputFormatters": [
    [ "markdownlint-cli2-formatter-json" ]
  ]
}

To customize the output file name or number of spaces to indent, use the following .markdownlint-cli2.jsonc:

{
  "outputFormatters": [
    [ "markdownlint-cli2-formatter-json", { "name": "custom-name.json", "spaces": 1 } ]
  ]
}

Example

[
  {
    "fileName": "viewme.md",
    "lineNumber": 3,
    "ruleNames": [
      "MD009",
      "no-trailing-spaces"
    ],
    "ruleDescription": "Trailing spaces",
    "ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.20.4/doc/Rules.md#md009",
    "errorDetail": "Expected: 0 or 2; Actual: 1",
    "errorContext": null,
    "errorRange": [
      10,
      1
    ],
    "fixInfo": {
      "editColumn": 10,
      "deleteCount": 1
    }
  },
  {
    "fileName": "viewme.md",
    "lineNumber": 5,
    "ruleNames": [
      "MD012",
      "no-multiple-blanks"
    ],
    "ruleDescription": "Multiple consecutive blank lines",
    "ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.20.4/doc/Rules.md#md012",
    "errorDetail": "Expected: 1; Actual: 2",
    "errorContext": null,
    "errorRange": null,
    "fixInfo": {
      "deleteCount": -1
    }
  },
  {
    "fileName": "viewme.md",
    "lineNumber": 6,
    "ruleNames": [
      "MD025",
      "single-title",
      "single-h1"
    ],
    "ruleDescription": "Multiple top-level headings in the same document",
    "ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.20.4/doc/Rules.md#md025",
    "errorDetail": null,
    "errorContext": "# Description",
    "errorRange": null,
    "fixInfo": null
  },
  {
    "fileName": "viewme.md",
    "lineNumber": 12,
    "ruleNames": [
      "MD019",
      "no-multiple-space-atx"
    ],
    "ruleDescription": "Multiple spaces after hash on atx style heading",
    "ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.20.4/doc/Rules.md#md019",
    "errorDetail": null,
    "errorContext": "##  Summary",
    "errorRange": [
      1,
      5
    ],
    "fixInfo": {
      "editColumn": 3,
      "deleteCount": 1
    }
  },
  {
    "fileName": "viewme.md",
    "lineNumber": 14,
    "ruleNames": [
      "MD047",
      "single-trailing-newline"
    ],
    "ruleDescription": "Files should end with a single newline character",
    "ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.20.4/doc/Rules.md#md047",
    "errorDetail": null,
    "errorContext": null,
    "errorRange": [
      14,
      1
    ],
    "fixInfo": {
      "editColumn": 15,
      "insertText": "\n"
    }
  }
]

Keywords

FAQs

Last updated on 25 Mar 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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc