Skip to content

fix(examples): keep oxlint root-only options out of nested configs - #7770

Merged
kodiakhq[bot] merged 1 commit into
mainfrom
cursor/oxc-vscode-nested-config-441c
Nov 1, 2026
Merged

kodiakhq[bot] merged 1 commit into
mainfrom
cursor/oxc-vscode-nested-config-441c

Conversation

@KATT

@KATT KATT commented Nov 1, 2026 •

Copy link
Copy Markdown
Member

Why

  • After chore: replace ESLint and Prettier with oxlint and oxfmt #7765, opening the repo in VS Code or Cursor makes the oxc extension fail with The options.typeAware option is only supported in the root config for examples/next-prisma-starter/.oxlintrc.json and examples/next-prisma-websockets-starter/.oxlintrc.json.
  • oxlint only allows options (typeAware, reportUnusedDisableDirectives, …) in the root config. The CLI never complained because each starter lints from its own folder, where its config is the root. The editor lints from the repo root, so the starter configs are nested there.
  • When that config fails to load, the extension falls back to the root config for starter files and reports the wrong rules (e.g. no-non-null-assertion).

What

  • Starter .oxlintrc.json files: drop the options block. Rules and plugins stay the same, so each starter still has a complete config when cloned on its own.
  • Starter lint scripts: set the same options as flags: oxlint --type-aware --report-unused-disable-directives-severity=warn src.
  • In the editor:
    • From the repo root, the root .oxlintrc.json options (typeAware, reportUnusedDisableDirectives: warn) apply to everything, including the starters.
    • A starter opened on its own already gets type-aware linting from "oxc.typeAware": true in its .vscode/settings.json.
  • Example tsconfigs that tsgolint rejects when the editor lints them from the root. None of these change build output:
    • examples/minimal, examples/lazy-load: add rootDir: "src". dist/ layout is unchanged.
    • examples/vercel-edge-runtime: moduleResolution: "bundler".
    • examples/.test/diagnostics-big-router: target: "es2017", moduleResolution: "bundler".
  • .vscode/settings.json needs no change.

Links

None. No docs or example routes change. Previews: next-prisma-starter, next-prisma-websockets-starter.

Alternatives considered

  • One root config with overrides for the starters: rejected. The starters are templates people clone, so they need their own complete config.
  • extends from the root config: same problem. A cloned starter would point at a file that isn't there.
  • oxlint has no root: true flag, so CLI flags are the only way to keep the starter options without putting options in a nested file.

Testing

  • Ran oxlint --lsp with the extension's init options (typeAware: true) on starter and package files:
    • On main: the same "only supported in the root config" errors as the editor.
    • On this branch: no errors and correct diagnostics.
    • Type-aware rules (no-floating-promises) and the local trpc/* JS plugin rules still fire.
  • Planted an await-thenable violation in a starter. It's caught from the root and by the starter's pnpm lint, and a stale oxlint-disable comment still warns.
  • pnpm lint (45 tasks), pnpm format, pnpm manypkg check all pass.
  • tsc and the build still pass for the changed example tsconfigs.
Open in Web Open in Cursor 

View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

Summary by CodeRabbit

  • Chores
    • Updated build settings across several example projects, including TypeScript targets, module resolution, and source directory boundaries.
    • Updated lint commands in the Prisma starter examples to enable type-aware checks and warn about unused disable directives.

Nested .oxlintrc.json files can't set `options` (typeAware,
reportUnusedDisableDirectives); the oxc editor extension refused to load
the two starter configs. Move those to CLI flags in the starters' lint
scripts and fix example tsconfigs that tsgolint rejects when linting from
the repo root.

Co-authored-by: alexander <[email protected]>
@KATT
KATT requested a review from a team as a code owner November 1, 2026 18:45
@vercel

vercel Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
next-prisma-starter Ready Ready Preview Nov 1, 2026 6:46pm UTC
next-prisma-websockets-starter Ready Ready Preview Nov 1, 2026 6:46pm UTC
5 Skipped Deployments
Project Deployment Actions Updated
examples-todomvc Skipped Skipped Nov 1, 2026 6:46pm UTC
og-image Skipped Skipped Nov 1, 2026 6:46pm UTC
tanstack-start-sse-chat Skipped Skipped Nov 1, 2026 6:46pm UTC
trpc-next-app-dir Skipped Skipped Nov 1, 2026 6:46pm UTC
www Skipped Skipped Nov 1, 2026 6:46pm UTC

Request Review

@coderabbitai

coderabbitai Bot commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
Commits

Reviewing files that changed from the base of the PR and between a81bba2 and 463547d.

Files selected for processing: 8
  • examples/.test/diagnostics-big-router/tsconfig.json
  • examples/lazy-load/tsconfig.json
  • examples/minimal/tsconfig.json
  • examples/next-prisma-starter/.oxlintrc.json
  • examples/next-prisma-starter/package.json
  • examples/next-prisma-websockets-starter/.oxlintrc.json
  • examples/next-prisma-websockets-starter/package.json
  • examples/vercel-edge-runtime/tsconfig.json
Files with no reviewable changes: 2
  • examples/next-prisma-starter/.oxlintrc.json
  • examples/next-prisma-websockets-starter/.oxlintrc.json

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

Walkthrough

Example project configurations now use updated TypeScript compiler settings. The Prisma starter lint scripts also set Oxlint options that were removed from their configuration files.

Changes: Example Configuration Updates

Layer / File(s) Summary
TypeScript compiler settings
examples/.test/diagnostics-big-router/tsconfig.json, examples/lazy-load/tsconfig.json, examples/minimal/tsconfig.json, examples/vercel-edge-runtime/tsconfig.json
The diagnostics example changes its target to es2017 and module resolution to bundler. The lazy-load and minimal examples set rootDir to src. The Vercel Edge Runtime example changes module resolution to bundler.
Oxlint command options
examples/next-prisma-starter/.oxlintrc.json, examples/next-prisma-starter/package.json, examples/next-prisma-websockets-starter/.oxlintrc.json, examples/next-prisma-websockets-starter/package.json
Both starters remove type-aware linting and unused-disable reporting options from .oxlintrc.json and add them to the lint script. The scripts continue to target src.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Possibly related PRs

  • trpc/trpc#7765: Migrates the repository from ESLint and Prettier to Oxlint and Oxfmt, and changes example TypeScript configurations.

Suggested reviewers: juliusmarminge, quiibz

Merge Risk: Minimal · up to 46354

No actionable merge-blocking risk is evident in the reviewed configuration changes.

Pre-merge checks: Passed 5
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes the main change: moving Oxlint root-only options out of nested example configurations and into CLI flags.
Docstring Coverage Passed No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 0 files. (6 skipped: 6 unsupported.)

Finishing Touches
Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@pkg-pr-new

pkg-pr-new Bot commented Nov 1, 2026

Copy link
Copy Markdown

Open in StackBlitz

@trpc/client

npm i https://pkg.pr.new/@trpc/client@7770

@trpc/next

npm i https://pkg.pr.new/@trpc/next@7770

@trpc/openapi

npm i https://pkg.pr.new/@trpc/openapi@7770

@trpc/react-query

npm i https://pkg.pr.new/@trpc/react-query@7770

@trpc/server

npm i https://pkg.pr.new/@trpc/server@7770

@trpc/tanstack-react-query

npm i https://pkg.pr.new/@trpc/tanstack-react-query@7770

@trpc/upgrade

npm i https://pkg.pr.new/@trpc/upgrade@7770

commit: 463547d

@trpc-bot trpc-bot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@KATT KATT added the 🚀 merge label Nov 1, 2026 — with Cursor
@kodiakhq
kodiakhq Bot added this pull request to the merge queue Nov 1, 2026
Merged via the queue into main with commit ff18984 Nov 1, 2026
53 of 54 checks passed
@kodiakhq
kodiakhq Bot deleted the cursor/oxc-vscode-nested-config-441c branch November 1, 2026 18:56
@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

This pull request has been locked because we are very unlikely to see comments on closed issues. If you think, this PR is still necessary, create a new one with the same branch. Thank you.

@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Nov 3, 2026

This branch was successfully deployed

1 active and 4 inactive deployments
Preview – next-prisma-starter — 463547d0 Deployed Nov 1, 2026 by vercel[bot]
Preview – og-image — 463547d0 Deployed Nov 1, 2026 by vercel[bot]
Preview – www — 463547d0 Deployed Nov 1, 2026 by vercel[bot]
Preview – examples-todomvc — 463547d0 Deployed Nov 1, 2026 by vercel[bot]
Preview – trpc-next-app-dir — 463547d0 Deployed Nov 1, 2026 by vercel[bot]
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants