Repository navigation
fix(lint): raise nesting cap to 5 levels - #63
Merged
Merged
Conversation
The sidebar renders 5 page levels under a category since readme #18931 / gitto #2216 raised MAX_SIDEBAR_NESTING_LEVELS from 3 to 5. The nesting validator and the dev preview still capped docs and reference at 3, so lint warned that levels 4 and 5 wouldn't render even though they do, and `readme dev` hid them. Raise both caps to 5 and add tests for the validator. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PMa6NvSAuJgavKvVjnL86d
The sidebar renders 5 page levels under a category since readme #18931 / gitto #2216 raised MAX_SIDEBAR_NESTING_LEVELS from 3 to 5. The nesting validator and the dev preview still capped docs and reference at 3, so lint warned that levels 4 and 5 wouldn't render even though they do, and `readme dev` hid them. Raise both caps to 5 and add tests for the validator. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PMa6NvSAuJgavKvVjnL86d
…o/cli into fix/nesting-cap-5-levels
Contributor
[Medium impact] The PR appears safe to merge; no actionable bugs were found. Reviews (1) · Last reviewed commit: "Merge branch 'fix/nesting-cap-5-levels' ..." · Reviewed by Greptile |
greptile-apps
Bot
dismissed
their stale review
November 5, 2026 22:29
Dismissed because a newer commit was pushed; Greptile will re-review the current head.
erunion
reviewed
Nov 5, 2026
erunion
approved these changes
Nov 5, 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.
Summary
The
nestinglint rule warns that pages more than 3 levels deep under a category won't render in the sidebar, even though ReadMe has supported up to 5 levels of nesting since June 2026. Customers runningnpx @readme/cli linton their PRs see warnings for level 4 and 5 pages that do render in their sidebar. For the same reason,readme devleaves those pages out of the local preview.This raises the cap for
docsandreferencefrom 3 to 5 in both places.Changes
src/validators/nesting.js:MAX_DEPTHfordocsandreferencegoes from 3 to 5.src/dev/lib/docs.js: the same 3 → 5 change to the preview's copy of the cap, soreadme devrenders levels 4 and 5.test/validators/nesting.test.js(new): the rule had no tests. They cover:docsandreference, are not flaggedrecipes/are still rejectedNotes
lint(exit code 1 is for errors only). This fixes noisy PR annotations, not broken CI.Testing
npx vitest run: 22 files, 286 tests passingnpx oxfmt --checkon the changed files: clean🤖 Generated with Claude Code