chore(deps): bump oxlint to 1.66 to fix worktree pre-commit hook#8945
Conversation
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.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
6 Skipped Deployments
|
PR SummaryLow Risk Overview
Reviewed by Cursor Bugbot for commit 0755de3. Bugbot is set up for automated code reviews on this repo. Configure here. |
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.
In order to let pre-commit hooks run cleanly from inside git worktrees, this PR bumps
oxlintfrom 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 rejectsoptions.typeAware:The net effect: the lint-staged step in
.husky/pre-commitblows up for every commit made from inside a worktree, regardless of what the diff is, which forces contributors (and Claude Code agents) to usegit 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-configworkaround flag tolint-stagedandinternal/scripts/lint.ts; the follow-up commit reverts it now that the bump makes it unnecessary.Change type
otherTest plan
git worktree add .claude/worktrees/test-worktreecd .claude/worktrees/test-worktree && yarn installyarn oxlint packages/tldraw/src/lib/ui/hooks/useClipboardEvents.ts— exits 0, nooptions.typeAwareparse error.git addit, andgit commit(without--no-verify) — pre-commit hook completes cleanly.Code changes
(
package.json+1 / -1,yarn.lock+84 / -84.)