Repository navigation
fix(lint): don't flag empty index.md pages whose children live in nested directories - #59
Merged
Merged
Conversation
Contributor
[Medium impact] The PR appears safe to merge; no actionable new bugs were found. Reviews (4) · Last reviewed commit: "fix(lint): treat .MD and .mdx files as c..." · Reviewed by Greptile |
Member
Author
olehshh
marked this pull request as ready for review
October 23, 2026 15:18
Member
Author
erunion
requested changes
Oct 29, 2026
greptile-apps
Bot
dismissed
their stale review
October 30, 2026 09:24
Dismissed because a newer commit was pushed; Greptile will re-review the current head.
Member
Author
erunion
approved these changes
Nov 3, 2026
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.
🧰 Changes
lintwas reportingEmpty page: non-hidden page has no contentfor an emptyindex.mdwhen its only children were nested page directories, e.g.:directory/
--index.md ← flagged
--nested/
----index.md
The
contentvalidator only treated an emptyindex.mdas a parent page if it had a sibling.mdfile, so adding a regularpage.mdnext to it made the warning go away. It now also counts subdirectories that contain at least one.mdfile as child pages.🧬 QA & Testing
test/validators/content.test.jscovering:index.mdwith a sibling page → not flaggedindex.mdwith only a nested page directory → not flagged (fails without this fix)index.mdwith no children → still flaggedlint --no-checkagainst the repro structure above: the warning appears onmainand is gone on this branch.