Skip to content

chore(deps): bump oxlint to 1.66 to fix worktree pre-commit hook#8945

Merged
frolic merged 2 commits into
mainfrom
frolic/oxlint-disable-nested-config
May 29, 2026
Merged

chore(deps): bump oxlint to 1.66 to fix worktree pre-commit hook#8945
frolic merged 2 commits into
mainfrom
frolic/oxlint-disable-nested-config

Conversation

@frolic

@frolic frolic commented May 27, 2026

Copy link
Copy Markdown
Contributor

In order to let pre-commit hooks run cleanly from inside git worktrees, this PR bumps oxlint from 1.58.0 to 1.66.0.

The bug

When a worktree lives under the main repo (for example .claude/worktrees/<name>/), oxlint 1.58 walks up from the file being linted, finds the worktree's .oxlintrc.json, and then keeps walking and also finds the main repo's .oxlintrc.json. It treats one of the two identical configs as a "nested" config and rejects options.typeAware:

The `options.typeAware` option is only supported in the root config,
but it was found in /Users/.../.oxlintrc.json

The net effect: the lint-staged step in .husky/pre-commit blows up for every commit made from inside a worktree, regardless of what the diff is, which forces contributors (and Claude Code agents) to use git commit --no-verify.

The fix

Upstream fixed this in oxlint 1.64 — oxc-project/oxc#22272 ("load root config by searching up parent directories"). Bumping to 1.66 (latest available in our registry mirror) picks up the fix at the source. No config or script changes needed.

The earlier commit on this branch added a --disable-nested-config workaround flag to lint-staged and internal/scripts/lint.ts; the follow-up commit reverts it now that the bump makes it unnecessary.

Change type

  • other

Test plan

  1. git worktree add .claude/worktrees/test-worktree
  2. cd .claude/worktrees/test-worktree && yarn install
  3. yarn oxlint packages/tldraw/src/lib/ui/hooks/useClipboardEvents.ts — exits 0, no options.typeAware parse error.
  4. Make any trivial change inside the worktree, git add it, and git commit (without --no-verify) — pre-commit hook completes cleanly.

Code changes

Section LOC change
Config/tooling +85 / -85

(package.json +1 / -1, yarn.lock +84 / -84.)

When a git worktree lives under the main repo (e.g. .claude/worktrees/<name>),
oxlint walks up from the staged file, finds the worktree's .oxlintrc.json,
and then keeps walking and finds the main repo's .oxlintrc.json as well.
It treats one as a "nested" config and rejects options.typeAware with:

  The `options.typeAware` option is only supported in the root config

This blocks the pre-commit hook for every commit made from a worktree, forcing
contributors (and Claude Code agents) to use `git commit --no-verify`.

This repo only has a single root .oxlintrc.json, so the cleanest fix is to
pass --disable-nested-config wherever oxlint is invoked — in the lint-staged
config and in the lint script.

Upstream: oxc-project/oxc#21426 and #19932 track the underlying behaviour.
@vercel

vercel Bot commented May 27, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
examples Ready Ready Preview May 27, 2026 2:17pm
6 Skipped Deployments
Project Deployment Actions Updated (UTC)
analytics Ignored Ignored Preview May 27, 2026 2:17pm
chat-template Ignored Ignored Preview May 27, 2026 2:17pm
tldraw-docs Ignored Ignored Preview May 27, 2026 2:17pm
tldraw-new Ignored Ignored Preview May 27, 2026 2:17pm
tldraw-shader Ignored Ignored Preview May 27, 2026 2:17pm
workflow-template Ignored Ignored Preview May 27, 2026 2:17pm

Request Review

@huppy-bot huppy-bot Bot added the other ⚙️ Changes that don't affect SDK users, e.g. internal or .com changes label May 27, 2026
@cursor

cursor Bot commented May 27, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
Tooling-only flag change with no runtime or security impact; intended to be a no-op outside nested worktree paths.

Overview
Adds --disable-nested-config to every oxlint invocation so lint uses only the first config file it finds instead of walking up the directory tree.

package.json lint-staged and internal/scripts/lint.ts (used by yarn lint) are updated. This fixes pre-commit and yarn lint failures in git worktrees nested under the main repo, where oxlint was loading duplicate .oxlintrc.json files and erroring on options.typeAware. With a single root oxlint config, behavior in a normal checkout should stay the same.

Reviewed by Cursor Bugbot for commit 0755de3. Bugbot is set up for automated code reviews on this repo. Configure here.

@frolic frolic marked this pull request as draft May 27, 2026 11:17
The worktree config bug was fixed upstream in oxlint 1.64 (oxc-project/oxc#22272
"load root config by searching up parent directories"). Bumping from 1.58 to 1.66
resolves it at the source, so the `--disable-nested-config` workaround added in
the previous commit is no longer needed and is reverted here.

Verified by re-running `oxlint <file>` from inside `.claude/worktrees/<name>/`
with the plain `oxlint` command (no flag): exits 0, no parse error. Full repo
`oxlint .` also passes on 1.66.
@frolic frolic changed the title fix(repo): pass --disable-nested-config to oxlint chore(deps): bump oxlint to 1.66 to fix worktree pre-commit hook May 27, 2026
@frolic frolic marked this pull request as ready for review May 27, 2026 14:20
@frolic frolic requested a review from max-drake May 27, 2026 14:27
@frolic frolic added this pull request to the merge queue May 29, 2026
Merged via the queue into main with commit 162927a May 29, 2026
21 checks passed
@frolic frolic deleted the frolic/oxlint-disable-nested-config branch May 29, 2026 10:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

other ⚙️ Changes that don't affect SDK users, e.g. internal or .com changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants