feat(components): render upstream rule docs link in RuleReferences#1137
Merged
Conversation
✅ Deploy Preview for oxc-project ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Read an optional `upstream` field from the page's frontmatter (matching the rest of the rule-page data flow — `rule`, `type_aware`, etc.) and, when present, render an "Upstream rule docs" link directly below "Rule Source" in the references list. Used by oxc-project/oxc#22769 which writes the upstream URL into the frontmatter of every auto-generated rule docs page (skipped for native oxc rules and unknown plugins).
c311f01 to
7f2b570
Compare
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
Adds an
upstreamprop on the<RuleReferences />component. When set, an "Upstream rule docs" link is rendered at the top of the references list, pointing at the original ESLint plugin's docs page for the rule.Used by oxc-project/oxc#22769, which writes the upstream URL on every auto-generated rule docs page (skipped for native oxc rules and unknown plugins).
After both PRs land, each rule page on oxc.rs will surface the upstream rule docs alongside the existing "Rule Source" / "Playground" links.
🤖 Generated with Claude Code