-
-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add rule doc pages #165
Closed
Closed
Conversation
This file contains 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
✅ Deploy Preview for oxc-project ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
This is amazing! |
Boshen
pushed a commit
to oxc-project/oxc
that referenced
this pull request
Aug 10, 2024
> AI-generated description because I'm lazy ### TL;DR This PR introduces the ability to generate documentation for linter rules and adds new methods and metadata for rule fix capabilities. To see what this looks like, please check out oxc-project/oxc-project.github.io#165. ## Screenshots Hyperlinks to rule doc pages in auto-generated rules table <img width="809" alt="image" src="https://github.com/user-attachments/assets/e09eb47d-e86a-4ed1-b1f9-5034f33c71a2"> Example of a docs page <img width="1273" alt="image" src="https://github.com/user-attachments/assets/78f7e9e6-f4dd-4cc9-aebc-1cdd64b024ec"> ### What changed? - Added `RuleFixMeta` to indicate rule fix capabilities - Introduced methods `is_none` and `is_pending` in `RuleFixMeta` - Modified `render_markdown_table` in `RuleTableSection` to accept an optional link prefix - Created new modules for rule documentation and HTML rendering - Updated `print_rules` function to generate markdown for rules and detailed documentation pages ### How to test? Run the `linter-rules` task with appropriate arguments to generate the markdown table and documentation pages. Verify the generated files for correctness and that all metadata is correctly displayed. ### Why make this change? To enhance the project documentation and provide clear rule fix capabilities, thereby improving the developer experience and easing the integration process. ---
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.
This is the rendered output of oxc-project/oxc#4715. This is just about ready to go, I just need to figure out what to do about textlint.