chore: strip redundant blank lines between list items in changelog/readme linters - #512
Merged
Merged
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
CHANGELOG.mdandreadme.txtlinters (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:
*/-, including indented sub-items). Blank lines that separate a list from a heading are governed by the existing spacing rules and are untouched.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.mdandsrc/readme.txt(no changes); removes stray inter-bullet and leading blanks from messy input;eslintclean on both files.