markdownlint "MD013/line-length" line too long in CI
markdownlint rule MD013 flags any line longer than its configured limit (80 columns by default). It reports the file, line, expected width, and actual width, then exits non-zero, failing the job.
What this error means
markdownlint prints "MD013/line-length Line length [Expected: 80; Actual: 132]" for one or more lines and the docs-lint job fails.
README.md:14 MD013/line-length Line length [Expected: 80; Actual: 132]
docs/guide.md:7 MD013/line-length Line length [Expected: 80; Actual: 118]Common causes
Prose lines exceed the default 80-column limit
MD013 is on by default with an 80-character limit. Long sentences, URLs, or tables trip it even though they render fine.
No project config raises or scopes the limit
Without a .markdownlint.json the default applies everywhere, including code blocks and tables that legitimately run wide.
How to fix it
Raise or scope the limit in .markdownlint.json
- Add a
.markdownlint.jsonat the repo root. - Set MD013 to a wider limit, or exempt code blocks and tables.
- Commit the config so CI and local runs agree.
{
"MD013": {
"line_length": 120,
"code_blocks": false,
"tables": false
}
}Disable MD013 entirely for prose repos
If you wrap prose semantically rather than by column, turn MD013 off so line length never fails the build.
{
"MD013": false
}How to prevent it
- Commit a
.markdownlint.jsonso the limit is explicit, not the default. - Exempt code blocks and tables from MD013 to avoid false positives.
- Run markdownlint locally (or via pre-commit) before pushing.