-
-
Notifications
You must be signed in to change notification settings - Fork 733
feat(lint/fmt): generate config types from json schema #16332
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
base: main
Are you sure you want to change the base?
feat(lint/fmt): generate config types from json schema #16332
Conversation
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
1743c7e to
88f3bdc
Compare
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 adds automated TypeScript type generation from JSON schemas for both oxlint and oxfmt configuration files using the quicktype-core library. The feature enhances type safety by generating TypeScript definitions (config.d.ts) from JSON schemas during the build process.
- Adds
quicktype-corev23.2.6 as a catalog dependency - Implements JSON schema to TypeScript type generation in build scripts
- Generates
config.d.tsfiles for both oxlint and oxfmt configurations
Reviewed changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| pnpm-workspace.yaml | Adds quicktype-core ^23.2.6 to the workspace catalog |
| pnpm-lock.yaml | Updates lockfile with quicktype-core and its dependencies |
| apps/oxlint/scripts/build.ts | Adds quicktype integration to generate TypeScript types from JSON schema |
| apps/oxlint/package.json | References quicktype-core from catalog as devDependency |
| apps/oxfmt/scripts/build.js | Adds quicktype integration similar to oxlint build script |
| apps/oxfmt/package.json | References quicktype-core from catalog as devDependency |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
Comments suppressed due to low confidence (1)
apps/oxlint/scripts/build.ts:69
- [nitpick] Missing trailing comma after the
rendererOptionsobject. This is inconsistent with the oxfmt build script (build.js:79) which includes a trailing comma. Add a trailing comma for consistency.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: LongYinan <lynweklm@gmail.com>
2ae2cb7 to
b847ac7
Compare
Boshen
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.
Context: we want to add configuration support to vite+ config.
This aligns with #15913, but before that lands this sounds like a temporary solution.

Uh oh!
There was an error while loading. Please reload this page.