Add support to YAML syntax for the `.markdownlintrc` config file
Request originated from this discussion: https://github.com/igorshubovych/markdownlint-cli/issues/317#issuecomment-1230486941
We have to update the documentation that was updated here https://github.com/igorshubovych/markdownlint-cli/pull/318 when this feature gets implemented
Super valuable, as yaml is more user friendly than JSON, and technically allows comments to be written :)
and technically allows comments to be written
It seems like a JSON ~/.markdownlintrc with comments could actually work...
Comments are stripped from JSON config via strip-json-comments.
...but it doesn't work in practice. Maybe if the current version of rc were used?
I can't actually tell which version is being used currently, since it's not listed in package.json and there isn't a package-lock.json committed.
It's run-con which replaced rc: https://github.com/igorshubovych/markdownlint-cli/blob/d38e22843106e6e729bc47089eb03d5648c70acc/package.json#L48
And here's a link to package-lock: https://github.com/igorshubovych/markdownlint-cli/blob/master/package-lock.json
Any down side of supporting yaml? From a technical PoV it's quite simple to add support to it AFAIK 😮
.markdownlintrc is a weird "it can be anything" file that is not supported by CLI2 or the VS Code extension. (Both support YAML via .markdownlint.yaml and similar.) I'd prefer not to invest further in this file format.