Conversation
|
Important Review skippedReview was skipped due to path filters ⛔ Files ignored due to path filters (1)
CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughWalkthroughFormatter migration from Prettier to oxfmt with corresponding configuration file updates and widespread formatting adjustments across example files and source code comments throughout the repository. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
View your CI Pipeline Execution ↗ for commit 6facc4e
☁️ Nx Cloud last updated this comment at |
Bundle Size Benchmarks
Trend sparkline is historical gzip bytes ending with this PR measurement; lower is better. |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
scripts/generate-labeler-config.ts (1)
16-22: Improve invalid-config diagnostics for.oxfmtrc.json.
JSON.parsefailures currently bubble up without file-specific context. Wrapping parse errors here will make CI/debug output clearer.Proposed patch
- const rawConfig = fs.readFileSync(oxfmtConfigPath, 'utf-8') - const parsedConfig = JSON.parse(rawConfig) as { - $schema?: string - } & FormatOptions + const rawConfig = fs.readFileSync(oxfmtConfigPath, 'utf-8') + let parsedConfig: { $schema?: string } & FormatOptions + try { + parsedConfig = JSON.parse(rawConfig) as { $schema?: string } & FormatOptions + } catch (error) { + const message = error instanceof Error ? error.message : String(error) + throw new Error( + `Invalid JSON in \`${oxfmtConfigPath}\`: ${message}`, + ) + }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@scripts/generate-labeler-config.ts` around lines 16 - 22, The JSON.parse call in generate-labeler-config.ts can throw without file context; wrap the parse in a try/catch around the JSON.parse(rawConfig) (the parsedConfig assignment) and on error throw a new, descriptive Error that includes the oxfmtConfigPath and the original error message (e.g., `Failed to parse ${oxfmtConfigPath}: ${err.message}`) so callers of the function get file-specific diagnostics while preserving the rest of the logic that destructures $schema and returns formatOptions.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@scripts/generate-labeler-config.ts`:
- Around line 16-22: The JSON.parse call in generate-labeler-config.ts can throw
without file context; wrap the parse in a try/catch around the
JSON.parse(rawConfig) (the parsedConfig assignment) and on error throw a new,
descriptive Error that includes the oxfmtConfigPath and the original error
message (e.g., `Failed to parse ${oxfmtConfigPath}: ${err.message}`) so callers
of the function get file-specific diagnostics while preserving the rest of the
logic that destructures $schema and returns formatOptions.
ℹ️ Review info
Configuration used: defaults
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (53)
.oxfmtrc.jsone2e/react-router/view-transitions/src/main.tsxe2e/react-start/basic-auth/prisma/migrations/migration_lock.tomle2e/react-start/basic-cloudflare/worker-configuration.d.tse2e/solid-router/view-transitions/src/main.tsxe2e/solid-start/basic-auth/prisma/migrations/migration_lock.tomle2e/solid-start/basic-cloudflare/worker-configuration.d.tse2e/vue-start/basic-auth/prisma/migrations/migration_lock.tomle2e/vue-start/basic-cloudflare/worker-configuration.d.tsexamples/react/kitchen-sink-file-based/src/routes/__root.tsxexamples/react/kitchen-sink-react-query-file-based/src/routes/__root.tsxexamples/react/kitchen-sink-react-query/src/main.tsxexamples/react/kitchen-sink/src/main.tsxexamples/react/start-basic-auth/prisma/migrations/migration_lock.tomlexamples/react/start-basic-cloudflare/worker-configuration.d.tsexamples/react/start-workos/prettier.config.jsexamples/react/start-workos/src/components/footer.tsxexamples/react/start-workos/src/components/sign-in-button.tsxexamples/react/start-workos/src/router.tsxexamples/react/start-workos/src/routes/__root.tsxexamples/react/start-workos/src/routes/_authenticated.tsxexamples/react/start-workos/src/routes/_authenticated/account.tsxexamples/react/start-workos/src/routes/api/auth/callback.tsxexamples/react/start-workos/src/routes/client.tsxexamples/react/start-workos/src/routes/index.tsxexamples/react/start-workos/src/routes/logout.tsxexamples/react/start-workos/src/start.tsexamples/react/start-workos/src/vite-env.d.tsexamples/react/start-workos/vite.config.tsexamples/react/view-transitions/src/main.tsxexamples/react/with-trpc-react-query/src/routes/__root.tsxexamples/react/with-trpc/src/routes/__root.tsxexamples/solid/kitchen-sink-file-based/src/routes/__root.tsxexamples/solid/kitchen-sink-solid-query-file-based/src/routes/__root.tsxexamples/solid/kitchen-sink-solid-query/src/main.tsxexamples/solid/kitchen-sink/src/main.tsxexamples/solid/start-basic-auth/prisma/migrations/migration_lock.tomlexamples/solid/start-basic-cloudflare/worker-configuration.d.tsexamples/solid/start-basic-netlify/netlify.tomlexamples/solid/view-transitions/src/main.tsxexamples/solid/with-trpc/src/routes/__root.tsxpackage.jsonpackages/react-router/src/fileRoute.tspackages/react-router/tests/route.test.tsxpackages/router-core/src/new-process-route-tree.tspackages/router-core/src/route.tspackages/router-core/tests/utils.test.tspackages/router-devtools-core/src/useStyles.tsxpackages/solid-router/src/fileRoute.tspackages/solid-router/tests/route.test.tsxpackages/vue-router/tests/route.test.tsxprettier.config.jsscripts/generate-labeler-config.ts
💤 Files with no reviewable changes (1)
- prettier.config.js
Summary
pnpm formatnow runsoxfmt) and add.oxfmtrc.jsonwith equivalent style settingsscripts/generate-labeler-config.tsto format YAML with Oxfmt and read options from the root.oxfmtrc.jsonto avoid duplicated formatter settingsprettier.config.jsand update lockfile/dependencies to use the latestoxfmtrelease while leaving@tanstack/router-generatoron PrettierValidation
Summary by CodeRabbit
.oxfmtrc.json) specifying formatting preferences including print width, quote style, and trailing commas.