[GH-ISSUE #239] Parsing of markdownlintrc fails because of comments #206

Closed
opened 2026-03-03 01:24:40 +03:00 by kerem · 2 comments
Owner

Originally created by @Stanzilla on GitHub (Dec 11, 2019).
Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/239

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?

Originally created by @Stanzilla on GitHub (Dec 11, 2019). Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/239 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?
kerem closed this issue 2026-03-03 01:24:41 +03:00
Author
Owner

@DavidAnson commented on GitHub (Dec 11, 2019):

This is an issue with the CLI project which is found here: https://github.com/igorshubovych/markdownlint-cli

I can’t move this issue, so will ask you to please open one there instead. When doing so, please include the .markdownlintrc file you are using - the details above aren’t clearly a comment issue to me.

Thanks!

<!-- gh-comment-id:564409871 --> @DavidAnson commented on GitHub (Dec 11, 2019): This is an issue with the CLI project which is found here: https://github.com/igorshubovych/markdownlint-cli I can’t move this issue, so will ask you to please open one there instead. When doing so, please include the .markdownlintrc file you are using - the details above aren’t clearly a comment issue to me. Thanks!
Author
Owner

@Stanzilla commented on GitHub (Dec 11, 2019):

https://github.com/igorshubovych/markdownlint-cli/issues/72

<!-- gh-comment-id:564556617 --> @Stanzilla commented on GitHub (Dec 11, 2019): https://github.com/igorshubovych/markdownlint-cli/issues/72
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/markdownlint#206
No description provided.