oxc/crates/oxc_linter
DonIsaac f62951411d feat(website): auto-generate rule docs pages (#4640)
> 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 https://github.com/oxc-project/oxc-project.github.io/pull/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.

---
2024-08-10 00:13:06 +00:00
..
examples refactor(linter): improve diagnostic labeling (#3960) 2024-06-29 05:19:22 +00:00
fixtures refactor(linter): replace Windows-style line breaks with Unix-style in test fixture (#4768) 2024-08-08 17:33:04 +00:00
src feat(website): auto-generate rule docs pages (#4640) 2024-08-10 00:13:06 +00:00
tests feat(tasks/website): code generate the linter rules 2024-05-23 15:21:37 +08:00
Cargo.toml Release oxlint v0.7.0 (#4657) 2024-08-05 13:46:06 +08:00
CHANGELOG.md Release oxlint v0.7.0 (#4657) 2024-08-05 13:46:06 +08:00