Skip to content

parsing of markdownlintrc fails because of comments(?) #72

@Stanzilla

Description

@Stanzilla

Currently when run via the CLI as npx markdownlint src/ --config .markdownlintrc the script fails with

Cannot read or parse config file .markdownlintrc: Unable to parse '.markdownlintrc'; Unexpected token / in JSON at position 169; missed comma between flow collection entries at line 10, column 12:
        "MD046": false,
               ^

is there a way this could be fixed by switching to a JSON5 compatible parser or maybe just strip them out instead of failing?

Content of .markdownlintrc

{
    // Enable all markdownlint rules
    "default": true,

    // Disable line length check for tables and code blocks
    "MD013": { "line_length": 180, "code_blocks": false, "tables": false },

    // Set Ordered list item prefix to "ordered" (use 1. 2. 3. not 1. 1. 1.)
    "MD029": { "style": "ordered" },

    // Set list indent level to 4 which Python-Markdown requires
    "MD007": { "indent": 4 },

    // Exclude code block style
    "MD046": false,
    "no-alt-text": true,
    "no-inline-html": false,
    "no-space-in-code": false,
    "code-block-style": "consistent"
}

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions