Skip to content

feat(linter): render upstream docs URL in website References section#22769

Merged
graphite-app[bot] merged 1 commit into
mainfrom
linter-license-attribution
May 28, 2026
Merged

feat(linter): render upstream docs URL in website References section#22769
graphite-app[bot] merged 1 commit into
mainfrom
linter-license-attribution

Conversation

@Boshen

@Boshen Boshen commented May 27, 2026

Copy link
Copy Markdown
Member

Summary

Renders the upstream-plugin docs URL inside each rule's ## References section on oxc.rs.

  • New tasks/website_linter/src/rules/upstream.rs with upstream_docs_url(plugin, name) -> Option<String> — convention-based per plugin, with per-rule overrides for cases where the directory differs from the true upstream:
    • react/rules-of-hooks and react/exhaustive-depseslint-plugin-react-hooks
    • react/only-export-componentseslint-plugin-react-refresh
  • doc_page.rs emits the URL as slot content inside the existing <RuleReferences> element. Native oxc rules and unknown plugins produce an empty <RuleReferences>.

Follow-up to #22768.

🤖 Generated with Claude Code

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3bcd990f90

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread tasks/website_linter/src/rules/upstream.rs Outdated
@Boshen Boshen force-pushed the linter-license-attribution branch from 3bcd990 to 8df8bbf Compare May 27, 2026 14:01
@Boshen Boshen force-pushed the linter-license-attribution branch from 8df8bbf to ef3f0d5 Compare May 27, 2026 14:32
Boshen added a commit to oxc-project/website that referenced this pull request May 27, 2026
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).
Boshen added a commit to oxc-project/website that referenced this pull request May 27, 2026
…1137)

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).
@Boshen Boshen force-pushed the linter-license-attribution branch from ef3f0d5 to e86c0c0 Compare May 27, 2026 14:55
@Boshen Boshen added the 0-merge Merge with Graphite Merge Queue label May 27, 2026

Boshen commented May 27, 2026

Copy link
Copy Markdown
Member Author

Merge activity

  • May 27, 2:57 PM UTC: The merge label '0-merge' was detected. This PR will be added to the Graphite merge queue once it meets the requirements.
  • May 28, 4:14 AM UTC: The merge label '0-merge' was detected. This PR will be added to the Graphite merge queue once it meets the requirements.
  • May 28, 4:14 AM UTC: Boshen added this pull request to the Graphite merge queue.
  • May 28, 4:19 AM UTC: Merged by the Graphite merge queue.

@connorshea connorshea left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Boshen Boshen added 0-merge Merge with Graphite Merge Queue and removed 0-merge Merge with Graphite Merge Queue labels May 28, 2026
…22769)

## Summary

Renders the upstream-plugin docs URL inside each rule's `## References` section on oxc.rs.

- New `tasks/website_linter/src/rules/upstream.rs` with `upstream_docs_url(plugin, name) -> Option<String>` — convention-based per plugin, with per-rule overrides for cases where the directory differs from the true upstream:
  - `react/rules-of-hooks` and `react/exhaustive-deps` → `eslint-plugin-react-hooks`
  - `react/only-export-components` → `eslint-plugin-react-refresh`
- `doc_page.rs` emits the URL as slot content inside the existing `<RuleReferences>` element. Native oxc rules and unknown plugins produce an empty `<RuleReferences>`.

Follow-up to #22768.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
@graphite-app graphite-app Bot force-pushed the linter-license-attribution branch from e86c0c0 to 687ad14 Compare May 28, 2026 04:15
@graphite-app graphite-app Bot merged commit 687ad14 into main May 28, 2026
27 checks passed
@graphite-app graphite-app Bot removed the 0-merge Merge with Graphite Merge Queue label May 28, 2026
@graphite-app graphite-app Bot deleted the linter-license-attribution branch May 28, 2026 04:19
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.

2 participants