admin管理员组文章数量:1414628
I'm running markdownlint
against some Markdown files and the rules configurations I have don't seem to be getting applied.
Here's my config file:
.markdownlint.yml
default: true
ignore_front_matter: true
MD013:
line_length: 240
Here's my document:
test.md
---
omit:
- thing1
---
# Header
These documents will serve as reference for the back-end automation supporting the Abc123 project.
I'm using this Docker image. I run this command:
mdl --config .markdownlint.yml test.md
Or with Docker:
docker run --rm -it -v ./myrepo:/repo --workdir /repo/docs markdownlint/markdownlint --config .markdownlint.yml test.md
I get this output:
test.md:7: MD013 Line length
test.md:3: MD032 Lists should be surrounded by blank lines
MD013
is triggering because the default line length is 80, but it shouldn't be because my configuration increases it to 240. MD032
should not be triggering on line 3 because I have ignore_front_matter
enabled (as described here).
I know it's processing the config file because when I use --verbose
I get:
Loaded config from /repo/docs/.markdownlint.yml
I copied the configuration from here.
I've tried with a config in json
and yml
with no change. What am I doing wrong here?
I'm running markdownlint
against some Markdown files and the rules configurations I have don't seem to be getting applied.
Here's my config file:
.markdownlint.yml
default: true
ignore_front_matter: true
MD013:
line_length: 240
Here's my document:
test.md
---
omit:
- thing1
---
# Header
These documents will serve as reference for the back-end automation supporting the Abc123 project.
I'm using this Docker image. I run this command:
mdl --config .markdownlint.yml test.md
Or with Docker:
docker run --rm -it -v ./myrepo:/repo --workdir /repo/docs markdownlint/markdownlint --config .markdownlint.yml test.md
I get this output:
test.md:7: MD013 Line length
test.md:3: MD032 Lists should be surrounded by blank lines
MD013
is triggering because the default line length is 80, but it shouldn't be because my configuration increases it to 240. MD032
should not be triggering on line 3 because I have ignore_front_matter
enabled (as described here).
I know it's processing the config file because when I use --verbose
I get:
Loaded config from /repo/docs/.markdownlint.yml
I copied the configuration from here.
I've tried with a config in json
and yml
with no change. What am I doing wrong here?
1 Answer
Reset to default 0It appears that the issue is the configuration file is specifically for the Node.js version of Markdownlint (markdownlint-cli2
), and is not compatible with the Ruby variation I'm using (mdl
) from markdownlint/markdownlint
.
When I use markdownlint-cli2
it works:
docker run --rm -it -v ./myrepo:/repo --workdir /repo/docs davidanson/markdownlint-cli2 --config .markdownlint.yml test.md
本文标签: markdownMarkdownlint not respecting configuration fileStack Overflow
版权声明:本文标题:markdown - Markdownlint not respecting configuration file? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745166754a2645729.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论