`vp migrate` copies string `extends` paths from `.oxlintrc.json` into `lint`, which `vp lint` rejects
Los mantenedores suelen responder en 1 día
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 35/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- rust, typescript
- Área
- developer-experience
Línea de trabajo
Start from the reproduction repo (cr101/vp-migrate-extends-repro) and run the migrate step to see how .oxlintrc.json is folded into the lint block of vite.config.ts. The string extends entries are copied unchanged, so the migrator needs to resolve each path relative to the original file, or keep the file and skip the lint block. Done when vp lint and tsc -p . both pass on the migrated repro, or the migrator warns and leaves the config for manual migration.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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 lintfails with "extends[0]must be a config object (strings/paths are not supported)."tscfails withTS2559: 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 [email protected] 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
- Read the Contributing Guidelines.
- Check that there isn't already an issue for the same bug. Related but different: #2430 and #2483 (dynamic
oxlint.config.ts/oxfmt.config.ts), and #2037 (migrate follow-ups; noextendsitem). - Confirm this is a Vite+ issue and not an upstream issue. Oxlint supports path
extendsin.oxlintrc.json; the invalid config is produced byvp migrate. - The provided reproduction is a minimal reproducible example.
- Lenguaje dominante
- Rust
- Estrellas
- 6k
- Forks
- 274
- Merge medio
- 1 d 12 h
- PR fusionados (30 d)
- 205
Preparar el entorno
Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de voidzero-dev/vite-plus
-
pending triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
voidzero-dev/vite-plus#2882 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
voidzero-dev/vite-plus#2097 · 10 comentarios · 2 reacciones ·
Los mantenedores suelen responder en 1 día
-
pending triage
Dificultad 3/5 1-2 días Aptitud para principiantes 45/100
voidzero-dev/vite-plus#3092 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
voidzero-dev/vite-plus#3091 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 30/100
voidzero-dev/vite-plus#3090 ·
Los mantenedores suelen responder en 1 día
Todos los issues de voidzero-dev/vite-plus
Issues similares
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
pop-os/cosmic-comp#2956 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
libp2p/rust-libp2p#6694 ·
Los mantenedores suelen responder en 1 día
-
Stack overflow in `check bans` with `include-dependencies = true` and a dev-dependency cycleAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
EmbarkStudios/cargo-deny#910 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
tursodatabase/turso#10054 ·
Los mantenedores suelen responder en 1 día
-
build: Update rust versionPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abiertodependencies
Dificultad 2/5 1-3 horas Aptitud para principiantes 67/100
ibm-granite-community/granite-cli#229 ·
Los mantenedores suelen responder en 1 día