igorshubovych / markdownlint-cli

MarkdownLint Command Line Interface
MIT License
851 stars 86 forks source link

Unable to set line-length via toml #472

Closed SanderDelden closed 4 months ago

SanderDelden commented 5 months ago

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

DavidAnson commented 5 months ago

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

SanderDelden commented 4 months ago

Bit late, but using

[tool.markdownlint.MD013]
line_length = 60

works. Thanks!