-
-
Notifications
You must be signed in to change notification settings - Fork 737
docs(oxfmt): Improve docs for .oxfmtrc.jsonc config fields and add markdownDescription fields to JSON Schema
#16587
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR improves the documentation formatting for .oxfmtrc.jsonc configuration fields by consistently wrapping default values and special characters in backticks. This enhancement improves readability and ensures proper rendering in markdown-based documentation and JSON schema descriptions.
Key changes:
- Added backticks around all default values in doc comments (booleans, numbers, and string enums)
- Wrapped special characters like
>in backticks for proper markdown rendering - Split long documentation lines for improved readability (e.g.,
bracketSameLinedescription)
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
crates/oxc_formatter/src/service/oxfmtrc.rs |
Updated source doc comments to use backticks around default values and special characters |
npm/oxfmt/configuration_schema.json |
Generated JSON schema with improved description formatting |
crates/oxc_formatter/tests/snapshots/schema_json.snap |
Updated test snapshot reflecting schema changes |
tasks/website_formatter/src/snapshots/schema_markdown.snap |
Updated markdown documentation snapshot with improved formatting |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
CodSpeed Performance ReportMerging #16587 will not alter performanceComparing Summary
Footnotes
|
.oxfmtrc.jsonc config fields.oxfmtrc.jsonc config fields and add markdownDescription fields to JSON Schema
leaysgur
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! And sorry for the late review.
Can you resolve the merge conflicts?
6242c41 to
356a549
Compare
|
@leaysgur rebased and ready to go :) |
leaysgur
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you~!
Merge activity
|
…markdownDescription fields to JSON Schema (#16587) We should probably also improve the `type: string` stuff in the output Markdown to serialize enums with their actual values, but that's a separate problem. This also updates the logic for generating the oxfmtrc `configuration_schema.json` file so it properly matches the way we generate the configuration_schema.json for oxlint, including with `markdownDescription` fields. See the oxlintrc file [here](https://github.com/oxc-project/oxc/blob/09ca3864227b30fa271d0ff35c5b5aa657f7c575/crates/oxc_linter/src/config/oxlintrc.rs#L205). Before: <img width="633" height="417" alt="Screenshot 2025-12-07 at 10 29 13 PM" src="https://github.com/user-attachments/assets/5cb205e3-2180-445b-a255-10b0831ff38a" /> After: <img width="807" height="213" alt="Screenshot 2025-12-07 at 10 30 07 PM" src="https://github.com/user-attachments/assets/f5b1eb5b-bcb9-4348-8517-12ef3b91b155" />
87ca29c to
8babdf9
Compare
…markdownDescription fields to JSON Schema (#16587) We should probably also improve the `type: string` stuff in the output Markdown to serialize enums with their actual values, but that's a separate problem. This also updates the logic for generating the oxfmtrc `configuration_schema.json` file so it properly matches the way we generate the configuration_schema.json for oxlint, including with `markdownDescription` fields. See the oxlintrc file [here](https://github.com/oxc-project/oxc/blob/09ca3864227b30fa271d0ff35c5b5aa657f7c575/crates/oxc_linter/src/config/oxlintrc.rs#L205). Before: <img width="633" height="417" alt="Screenshot 2025-12-07 at 10 29 13 PM" src="https://github.com/user-attachments/assets/5cb205e3-2180-445b-a255-10b0831ff38a" /> After: <img width="807" height="213" alt="Screenshot 2025-12-07 at 10 30 07 PM" src="https://github.com/user-attachments/assets/f5b1eb5b-bcb9-4348-8517-12ef3b91b155" />
We should probably also improve the
type: stringstuff in the output Markdown to serialize enums with their actual values, but that's a separate problem.This also updates the logic for generating the oxfmtrc
configuration_schema.jsonfile so it properly matches the way we generate the configuration_schema.json for oxlint, including withmarkdownDescriptionfields. See the oxlintrc file here.Before:
After: