docs(website): add rule documentation pages with sidebar navigation#547
docs(website): add rule documentation pages with sidebar navigation#547chenjiahan merged 2 commits intomainfrom
Conversation
Summary of ChangesHello, 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 Highlights
Using Gemini Code AssistThe 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
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 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
|
Deploying rslint with
|
| 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 |
20081b9 to
259d4f0
Compare
There was a problem hiding this comment.
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
9e385f4 to
2f90981
Compare
Summary
.mdfiles in Go rule directories (zero duplication)<RuleConfig>component showing a complete, copy-pasteablerslint.config.tssnippet with the correct import, preset, and rule override for its plugin grouparchitecture.mdto document the JS/TS flat config system (recommended) and deprecated JSON config, including the two-layer CLI architecture and config merging semanticsKey changes
scripts/gen-rule-manifest.jsdocPathfield to each rule entry in manifestwebsite/plugin-rule-manifest.tsaddPageshook for rule pages,confighook for sidebar/nav, registerRuleConfigas global MDX componentwebsite/theme/components/RuleConfig.tsxCodeBlockRuntimefor config snippetswebsite/theme/components/RuleStates/rule.tsxarchitecture.mdSnapshot
Checklist