Skip to content

chore: strip redundant blank lines between list items in changelog/readme linters - #512

Merged
imantsk merged 1 commit into
corefrom
chore/changelog-linter-blank-lines/core
Sep 1, 2026
Merged

chore: strip redundant blank lines between list items in changelog/readme linters#512
imantsk merged 1 commit into
corefrom
chore/changelog-linter-blank-lines/core

Conversation

@imantsk

@imantsk imantsk commented Sep 1, 2026

Copy link
Copy Markdown
Member

The CHANGELOG.md and readme.txt linters (scripts/linters/lint-changelog.ts, scripts/linters/lint-readme.ts) collapsed consecutive blank lines but kept a single blank line sitting between two list items. Stray blanks between bullets therefore survived autofix and accumulated across releases.

Both linters gain two passes:

  • No blank lines between consecutive list items — a blank line is dropped when the line above and the next non-blank line are both list items (* / - , including indented sub-items). Blank lines that separate a list from a heading are governed by the existing spacing rules and are untouched.
  • No leading blank lines before the title / plugin header.

Both linters already run before every release commit via the .githooks/pre-commit → lint-staged hook, so generated changelog/readme entries are cleaned automatically — no workflow change needed.

Verified: idempotent on the current committed CHANGELOG.md and src/readme.txt (no changes); removes stray inter-bullet and leading blanks from messy input; eslint clean on both files.

…adme linters

The changelog and readme linters collapsed consecutive blank lines but kept a
single blank line sitting between two list items, so stray blanks between
bullets survived and accumulated across releases. Add a pass that drops blank
lines between consecutive list items, plus one that strips leading blank lines
before the title/header. Both linters already run before every release commit
via the lint-staged pre-commit hook, so generated entries are now cleaned
automatically.
@imantsk
imantsk merged commit e034505 into core Sep 1, 2026
10 checks passed
@imantsk
imantsk deleted the chore/changelog-linter-blank-lines/core branch September 1, 2026 15:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant