DavidAnson / vscode-markdownlint

Markdown linting and style checking for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=DavidAnson.vscode-markdownlint
MIT License
897 stars 166 forks source link

Allow comments in markdownlint.json #269

Closed metablaster closed 1 year ago

metablaster commented 1 year ago

Sample markdownlint.json

{
    "_comment": "Disable reporting long lines",
    "MD013": false
}

While it's valid json syntax the comment (in quotes, not the keyword) is reported as: Incorrect type: expected on of boolean, object

I propose that markdownlint doesn't report json comments as incorrect.

DavidAnson commented 1 year ago

Using .markdownlint.jsonc as the config format will allow JSONC which includes support for C-style comments.

metablaster commented 1 year ago

Yes, in the mean time I've read the docs and learned that markdownlint allows jsonc files so I renamed my configs to jsonc, however regardless I think not reporting comments in json is a matter of meticulousness and code correctness.

If you don't agree I'm fine with that since jsonc comments work well.

DavidAnson commented 1 year ago

I believe .markdownlint.json can have JSONC comments as well. But the editor may get confused about that, so it's easier to use the JSONC extension.