mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2026-04-25 17:26:22 +03:00
[GH-ISSUE #118] feature_request(configuration): support YAML configuration format #1947
Labels
No labels
bug
enhancement
enhancement
enhancement
fixed in next
fixed in next
fixed in next
new rule
new rule
new rule
pull-request
question
refactoring
refactoring
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/markdownlint#1947
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Kristinita on GitHub (Apr 17, 2018).
Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/118
1. Summary
It would be nice, if Markdownlint will support configuration file in YAML format.
2. Argumentation
2.1. Comments
I can't use comments in
.markdownlintrc.I think, that comment, why I use this or that option, is a nice practice. My
.markdownlintrcfile:I use grunt-markdownlint plugin. It supports JSON configuration file:
grunt.file.readJSONdoesn't support comments in.markdownlintrcfile → I can't use comments in.markdownlintrc.Grunt support parsing YAML data.
2.2. Another reasons
Thanks.
@DavidAnson commented on GitHub (Apr 17, 2018):
Thanks for the detailed issue! There are JSON parsers that allow comments - would that work for you?
(JSON is already familiar to JavaScript programmers; I’m reluctant to introduce another file type that isn’t.)
@DavidAnson commented on GitHub (Apr 17, 2018):
(Unfortunately, changing the parser
markdownlintuses won’t help with your Grunt scenario. I’ll think more about this.)@DavidAnson commented on GitHub (Apr 17, 2018):
Wait - for your scenario, shouldn’t you be able to switch to a YAML file today and use
grunt.file.readYAMLto read it into a JavaScript object?@Kristinita commented on GitHub (Apr 17, 2018):
@DavidAnson,
1. Grunt
✓ Works with YAML configuration file.
I convert JSON above to YAML file
markdownlint.yml→ I replacegrunt.file.readJSONtogrunt.file.readYAMLin Gruntfile → grunt-markdownlint successful works.I'm sorry, I didn't check it, because I didn't think it would work.
2. markdownlint-cli
☒ Doesn't support YAML configuration file.
markdownlint-cli (and Sublime Text Markdownlint, that needs markdownlint-cli).
3. Questions
markdownlint.ymlor something else?Thanks.
@DavidAnson commented on GitHub (Apr 17, 2018):
I would suggest
.markdownlint.yaml. I think this may become a work item for the CLI project (where I would document it).@Kristinita commented on GitHub (May 14, 2018):
@DavidAnson , we wait YAML configuration format for markdownlint-cli.
Thanks.