Skip to content

vp migrate copies string extends paths from .oxlintrc.json into lint, which vp lint rejects #3089

Description

@cr101

Describe the bug

.oxlintrc.json can extend other config files by path, as the Oxlint docs describe:

{ "extends": ["./shared/oxlint-config.json"] }

vp migrate deletes .oxlintrc.json and copies the path string unchanged into the lint block of vite.config.ts:

lint: {
  extends: ["./shared/oxlint-config.json"],
  // ...
}

Vite+ then rejects that config:

  • vp lint fails with "extends[0] must be a config object (strings/paths are not supported)."
  • tsc fails with TS2559: Type 'string' has no properties in common with type 'OxlintConfig'.

The migration reports success, but linting is broken afterwards, and the original .oxlintrc.json has been deleted.

Expected: either the migrator resolves each extends path and inlines or imports the config as an object, or it keeps .oxlintrc.json, leaves the lint block out and warns that the config needs to be migrated by hand.

Reproduction

https://github.com/cr101/vp-migrate-extends-repro

Steps to reproduce

npm install
npm run lint            # oxlint applies no-debugger from the extended config
npx -y --package=vite-plus@1.2.0 vp migrate --no-interactive --no-agent --no-editor --no-hooks
npx vp lint             # fails
npx tsc -p .            # fails

System Info

$ vp env current
Node.js:
  Version    26.12.0
  Source     system PATH
  Bin Path   C:\Program Files\nodejs\node.exe
  Installed  true
  Mode       system_first

Package Manager:
  Name       npm
  Version    11.20.0
  Source     system PATH
  Bin Paths
    npm      C:\Program Files\nodejs\npm.cmd
    npx      C:\Program Files\nodejs\npx.cmd
  Installed  true
  Mode       system_first

$ vp --version   # global CLI, in the repro before migration
vp v1.2.0

Local vite-plus:
  vite-plus  Not found

Tools:
  vite             Not found
  rolldown         Not found
  vitest           Not found
  oxfmt            Not found
  oxlint           Not found
  oxlint-tsgolint  Not found
  tsdown           Not found

Environment:
  Package manager  npm v11.8.0
  Node.js          v24.22.0

$ npx vp --version   # local CLI, in the repro after migration
vp v1.2.0

Local vite-plus:
  vite-plus  v1.2.0

Tools:
  vite             v8.3.4
  rolldown         v1.2.13
  vitest           v5.0.4
  oxfmt            v0.73.0
  oxlint           v1.88.0
  oxlint-tsgolint  v7.0.2004
  tsdown           v0.23.1

Windows x64. The migration and checks ran on system Node 26.12.0, with npm 11.8.0 selected by `packageManager`.

Used Package Manager

npm

Logs

$ npx vp migrate --no-interactive --no-agent --no-editor --no-hooks
◇ Migrated . to Vite+ 1.2.0
• Node 26.12.0  npm 11.8.0
✓ Dependencies installed in 16s
• 1 config update applied, 1 file had imports rewritten

$ npx vp lint
Failed to parse oxlint configuration file.

  x Failed to load config: ...\vp-extends-repro\vite.config.ts
  |
  | Error: `extends[0]` must be a config object (strings/paths are not supported).

$ npx tsc -p .
vite.config.ts(6,15): error TS2559: Type 'string' has no properties in common with type 'OxlintConfig'.

Validations

Activity

  1. added theissue type on Oct 17, 2026
  2. jong-kyung commented on Oct 17, 2026

    @jong-kyung
    Collaborator

    This is being addressed in #2695

  3. fengmk2 commented on Oct 17, 2026

    @fengmk2
    Member

    I checked #2695 against your reproduction. It preserves .oxlintrc.json and avoids generating invalid lint.extends entries, so the TypeScript error is resolved.

    However, this is only a partial fix. Plain vp lint does not apply the retained JSON rules. The PR adds a warning to use vp lint -c .oxlintrc.json or convert the config manually.

    We should keep this issue open until migration preserves the inherited rules and their severity with plain vp lint. The regression test needs to verify that behavior after migration and on a second migration run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

Fields

Priority

None yet

Effort

None yet

Target date

None yet

Start date

None yet

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions