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

Unable to set line-length via toml

Open SanderDelden opened this issue 1 year ago • 1 comments

Hi,

The max line length setting set in a .toml file is not respected:

[tool.markdownlint]
line-length = 200

If line-length is set to false the error is ignored, however I want to be able to set an integer.

[tool.markdownlint]
line-length = false

Command used: markdownlint test.md --config pyproject.toml --configPointer /tool/markdownlint

SanderDelden avatar May 14 '24 16:05 SanderDelden

You need to set the "line_length" property of that rule to an integer, not assign the integer to the rule name itself.

Here is an example: https://github.com/DavidAnson/markdownlint/blob/b2305efafb034b1f328845aec9928b5363ffd646/schema/.markdownlint.yaml#L63

DavidAnson avatar May 14 '24 16:05 DavidAnson

Bit late, but using

[tool.markdownlint.MD013]
line_length = 60

works. Thanks!

SanderDelden avatar Jun 19 '24 13:06 SanderDelden