Skip to content

docs(website): add rule documentation pages with sidebar navigation#547

Merged
chenjiahan merged 2 commits intomainfrom
feat/rule-docs-website-20260319
Mar 19, 2026
Merged

docs(website): add rule documentation pages with sidebar navigation#547
chenjiahan merged 2 commits intomainfrom
feat/rule-docs-website-20260319

Conversation

@fansenze
Copy link
Copy Markdown
Contributor

@fansenze fansenze commented Mar 19, 2026

Summary

  • Add individual documentation pages for all 128 implemented lint rules to the website, sourced directly from the .md files in Go rule directories (zero duplication)
  • Each rule page includes a <RuleConfig> component showing a complete, copy-pasteable rslint.config.ts snippet with the correct import, preset, and rule override for its plugin group
  • Rules overview table now links to internal doc pages (with external fallback for rules without docs)
  • Sidebar groups rules by plugin (eslint, typescript-eslint, import, react) with configurable sort order
  • Update architecture.md to document the JS/TS flat config system (recommended) and deprecated JSON config, including the two-layer CLI architecture and config merging semantics

Key changes

File Change
scripts/gen-rule-manifest.js Add docPath field to each rule entry in manifest
website/plugin-rule-manifest.ts Add addPages hook for rule pages, config hook for sidebar/nav, register RuleConfig as global MDX component
website/theme/components/RuleConfig.tsx New component using Rspress CodeBlockRuntime for config snippets
website/theme/components/RuleStates/rule.tsx Link to internal pages when doc exists
architecture.md Document JS/TS and JSON config systems

Snapshot

image

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

@gemini-code-assist
Copy link
Copy Markdown

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly enhances the rslint project's documentation website by introducing comprehensive, dynamically generated pages for every linting rule. It establishes a robust system for integrating rule documentation directly from the codebase, complete with interactive configuration examples and an organized sidebar navigation. Concurrently, the core architecture.md has been updated to reflect the latest configuration practices and the underlying CLI structure, providing clearer guidance for developers.

Highlights

  • Rule Documentation Pages: Added dedicated documentation pages for all 128 implemented lint rules, directly sourced from Go rule markdown files, ensuring zero duplication.
  • Configuration Documentation Update: Updated the architecture.md document to detail the recommended JS/TS flat configuration system, the deprecated JSON config, and the two-layer CLI architecture.
  • Interactive Rule Configuration: Introduced a <RuleConfig> component to automatically generate and display copy-pasteable rslint.config.ts snippets on each rule's documentation page.
  • Enhanced Navigation: Enhanced the rules overview table to link directly to the new internal documentation pages, with external fallbacks for rules without local docs, and implemented a dynamic sidebar navigation grouping rules by plugin.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages bot commented Mar 19, 2026

Deploying rslint with  Cloudflare Pages  Cloudflare Pages

Latest commit: 2f90981
Status: ✅  Deploy successful!
Preview URL: https://87cf2c1a.rslint.pages.dev
Branch Preview URL: https://feat-rule-docs-website-20260.rslint.pages.dev

View logs

@fansenze fansenze force-pushed the feat/rule-docs-website-20260319 branch from 20081b9 to 259d4f0 Compare March 19, 2026 05:39
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request significantly enhances the project's website by adding individual documentation pages for all lint rules, complete with sidebar navigation. It also includes substantial updates to the architecture documentation to reflect the new JS/TS flat configuration system. The changes are well-structured and the new features are a great addition for users. I've found one potential issue in the dynamic page generation logic that could cause incorrect rendering for certain markdown files, and I've provided a suggestion to make it more robust. Overall, this is a solid contribution.

- Add docPath field to rule-manifest.json for each rule's .md source file
- Create RuleConfig global MDX component using Rspress CodeBlockRuntime
  to display configuration snippets with correct imports and presets
  per plugin group
- Extend plugin-rule-manifest with addPages hook to register 128 rule
  doc pages directly from Go source .md files (zero duplication)
- Add sidebar with grouped navigation (eslint, typescript-eslint, etc.)
- Update rules overview table to link internally for rules with docs,
  falling back to external docs otherwise
- Document JS/TS flat config as the recommended approach and JSON config
  as deprecated
- Add config entry structure table, loading flow for both config types,
  and flat config merging semantics
- Update CLI flow to describe the two-layer architecture (Node.js wrapper
  + Go binary)
- Update data flow diagram to reference both config types
@fansenze fansenze force-pushed the feat/rule-docs-website-20260319 branch 2 times, most recently from 9e385f4 to 2f90981 Compare March 19, 2026 06:35
@fansenze fansenze requested review from chenjiahan and hardfist March 19, 2026 06:37
@chenjiahan chenjiahan changed the title feat(website): add rule documentation pages with sidebar navigation docs(website): add rule documentation pages with sidebar navigation Mar 19, 2026
@chenjiahan chenjiahan merged commit cb65865 into main Mar 19, 2026
28 checks passed
@chenjiahan chenjiahan deleted the feat/rule-docs-website-20260319 branch March 19, 2026 11:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants