oxc/crates
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
..
oxc Release crates v0.24.0 (#4749) 2024-08-08 14:00:57 +08:00
oxc_allocator Release crates v0.24.0 (#4749) 2024-08-08 14:00:57 +08:00
oxc_ast refactor(ast_codegen): line breaks between types in layout assertions (#4781) 2024-08-09 10:17:21 +00:00
oxc_ast_macros fix(ast_macros): raise compile error on invalid generate_derive input. (#4766) 2024-08-08 19:06:43 +00:00
oxc_cfg Release crates v0.24.0 (#4749) 2024-08-08 14:00:57 +08:00
oxc_codegen Release crates v0.24.0 (#4749) 2024-08-08 14:00:57 +08:00
oxc_diagnostics Release crates v0.24.0 (#4749) 2024-08-08 14:00:57 +08:00
oxc_index Release crates v0.24.0 (#4749) 2024-08-08 14:00:57 +08:00
oxc_isolated_declarations Release crates v0.24.0 (#4749) 2024-08-08 14:00:57 +08:00
oxc_js_regex chore: crates should only publish src and examples directory 2024-06-08 16:35:16 +08:00
oxc_language_server refactor(linter): use diagnostic codes in lint rules (#4349) 2024-07-20 03:35:00 +00:00
oxc_linter feat(website): auto-generate rule docs pages (#4640) 2024-08-10 00:13:06 +00:00
oxc_macros refactor(ast_codegen): replace Windows-style line breaks with Unix-style (#4769) 2024-08-08 17:28:58 +00:00
oxc_mangler Release crates v0.24.0 (#4749) 2024-08-08 14:00:57 +08:00
oxc_minifier Release crates v0.24.0 (#4749) 2024-08-08 14:00:57 +08:00
oxc_module_lexer Release crates v0.24.0 (#4749) 2024-08-08 14:00:57 +08:00
oxc_parser Release crates v0.24.0 (#4749) 2024-08-08 14:00:57 +08:00
oxc_prettier chore: remove unsafe_code = "warn" rust lint 2024-07-15 10:39:08 +08:00
oxc_semantic Release crates v0.24.0 (#4749) 2024-08-08 14:00:57 +08:00
oxc_sourcemap Release crates v0.24.0 (#4749) 2024-08-08 14:00:57 +08:00
oxc_span Release crates v0.24.0 (#4749) 2024-08-08 14:00:57 +08:00
oxc_syntax Release crates v0.24.0 (#4749) 2024-08-08 14:00:57 +08:00
oxc_transformer Release crates v0.24.0 (#4749) 2024-08-08 14:00:57 +08:00
oxc_traverse Release crates v0.24.0 (#4749) 2024-08-08 14:00:57 +08:00
oxc_wasm refactor(minifier): ast passes infrastructure (#4625) 2024-08-04 11:58:39 +00:00