feature_request(configuration): support YAML configuration format
See original GitHub issue1. 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 .markdownlintrc
file:
{
//////////////////
// Markdownlint //
//////////////////
// Lint Markdown files:
// https://www.npmjs.com/package/markdownlint
// Ruby Markdownlint obsolete, have bugs (see comments below)
// and doesn't support at the time:
// https://rubygems.org/gems/mdl
// Markdownlint styles:
// Rules: https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md
//
//
// [DEPRECATED] In my Pelican articles I use h1 tag in page templates
// I begin section use h2 tag
// Using h1 tag is good — http://archive.li/X3d8c
// Enable, because downheader extension
// https://github.com/cprieto/mdx_downheader
// "MD002": false,
// [WARNING] Rule only for spaces indentation, show errors, if using tabs. So exclude.
"MD007": false,
// Allowed 2 trailing spaces in line, not 1, 3 or 4:
// https://github.com/markdownlint/markdownlint/issues/165
"MD009": {
"br_spaces": 2
},
// I prefer tabs instead of spaces:
// https://softwareengineering.stackexchange.com/a/72/264224
"MD010": false,
// [DEPRECATED] In my Pelican articles I use h1 tag in page templates
// I begin section use h2 tag
// Using h1 tag is good — http://archive.li/X3d8c
// Enable, because downheader extension
// https://github.com/cprieto/mdx_downheader
// exclude_rule 'MD0102'
"MD013": false,
// I use MarkdownTOC autoanchoring:
// https://github.com/naokazuterada/MarkdownTOC#auto-anchoring-when-heading-has-anchor-defined
"MD022": false,
// [DONE] This option works in Node Markdownlint, not Ruby mdl:
// I end headers with question marks:
// [BUG] Doesn't work, if inline HTML:
// https://github.com/markdownlint/markdownlint/issues/196
"MD026": {
"punctuation": ".,;:!"
},
// Pelican features needs inline HTML support
"MD033": false,
// I use bare URL for Pelican article metadata variable “Opengraphimage”.
// Open Graph — http://ruogp.me/
// Also, I use bare URL for magiclink:
// http://facelessuser.github.io/pymdown-extensions/extensions/magiclink/
"MD034": false,
// [DONE] This option works in Node Markdownlint, not Ruby mdl:
// [BUG] Temporary exclude rule before the new release:
// https://github.com/mivok/markdownlint/pull/160
// "MD039": false,
// In Pelican articles and pages first line — is Metadata, not header
"MD041": false
}
I use grunt-markdownlint plugin. It supports JSON configuration file:
example2: {
options: {
config: grunt.file.readJSON(rulesFile) //read linting rules from file
}
grunt.file.readJSON
doesn’t support comments in .markdownlintrc
file → I can’t use comments in .markdownlintrc
.
Grunt support parsing YAML data.
2.2. Another reasons
Thanks.
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Feature Request: YAML configuration for Docker Access Method
Hi,. We're trying to codify our Enterprise Artifactory config. Recently we realized that there are no possibilities to specify Docker Access ...
Read more >Is there any utility to yaml configuration for Apigee edge
Solved: Hi, I don't see any utility for "Apigee Edge" which supports yaml configuration e.g. Manage KVM configuration in yaml file. Below.
Read more >Spring @PropertySource using YAML - Stack Overflow
If I annotate my TestConfiguration (a simple Java config), it is expecting a properties file. For example this doesn't work: @PropertySource( ...
Read more >`.gitlab-ci.yml` keyword reference - GitLab Docs
This document lists the configuration options for your GitLab .gitlab-ci.yml file. For a quick introduction to GitLab CI/CD, follow the ...
Read more >Core Features - Spring
It is also possible to configure the SpringApplication by using an application.properties file. See Externalized Configuration for details. For a complete list ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I would suggest
.markdownlint.yaml
. I think this may become a work item for the CLI project (where I would document it).Wait - for your scenario, shouldn’t you be able to switch to a YAML file today and use
grunt.file.readYAML
to read it into a JavaScript object?