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
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745166755a4614680.html
评论列表(0条)