markdownlint-cli icon indicating copy to clipboard operation
markdownlint-cli copied to clipboard

Add support to YAML syntax for the `.markdownlintrc` config file

Open rogerluan opened this issue 3 years ago • 4 comments

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 :)

rogerluan avatar Aug 29 '22 16:08 rogerluan

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.

edbrannin avatar Nov 09 '23 15:11 edbrannin

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

DavidAnson avatar Nov 09 '23 17:11 DavidAnson

Any down side of supporting yaml? From a technical PoV it's quite simple to add support to it AFAIK 😮

rogerluan avatar Nov 11 '23 04:11 rogerluan

.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.

DavidAnson avatar Nov 11 '23 05:11 DavidAnson