Monorepo: nested package's lint rules/jsPlugins silently dropped when workspace root has a lint block
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 74/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- typescript
- Ambito
- tooling
Direzione di ricerca
Inizia con la riproduzione composta da sei file, esegui pnpm install, quindi esegui cd apps/child 6�26 vp lint e vp lint --print-config con il blocco lint della root presente. Confronta la configurazione stampata con i file vite.config.ts della root e del child; il lavoro è completato quando la regola no-throw-literal del child e jsPlugins vengono inoltrati o segnalati, invece di essere eliminati silenziosamente.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Summary
In a pnpm workspace/monorepo, when the root vite.config.ts has its own lint block, a nested package's lint.rules and lint.jsPlugins are silently ignored by vp lint. Remove the root's lint block and the nested config is forwarded correctly, so the nested config itself is valid.
Tested on vite-plus 0.3.0 (oxlint 1.79).
Minimal reproduction
Self-contained, 6 files, no custom plugin needed. Run with pnpm install then cd apps/child && vp lint.
repro/
├── package.json # devDeps: vite-plus 0.3.0
├── pnpm-workspace.yaml # packages: ["apps/*"]
├── vite.config.ts # ROOT: has a lint block
└── apps/
└── child/
├── package.json # devDeps: vite-plus 0.3.0
├── vite.config.ts # CHILD: lint.rules + lint.jsPlugins
└── src/bad.ts # throws a string literal
Root vite.config.ts:
import { defineConfig } from 'vite-plus';
export default defineConfig({
lint: {
jsPlugins: [{ name: 'vite-plus', specifier: 'vite-plus/oxlint-plugin' }],
rules: { 'vite-plus/prefer-vite-plus-imports': 'error' },
options: { typeAware: true, typeCheck: true },
},
});
Child apps/child/vite.config.ts:
import { defineConfig } from 'vite-plus';
export default defineConfig({
lint: {
rules: { 'no-throw-literal': 'error' },
jsPlugins: [
{ name: 'ghost', specifier: 'this-plugin-is-definitely-not-installed' },
],
},
});
Child apps/child/src/bad.ts:
export function ping(): string {
throw 'a string literal'; // violates no-throw-literal ('ghost' jsPlugin would crash oxlint if loaded)
}
Actual
$ cd apps/child && vp lint
# (no output — neither the rule nor the plugin is applied, and loading the
# nonexistent "ghost" plugin does not even get attempted)
Expected
throw 'a string literal' should be reported by no-throw-literal, and the ghost jsPlugin load should be attempted (would expect a loud error for a nonexistent plugin).
Proof the nested config is fine (and the bug is the root's lint block)
Root lint block present:
$ cd apps/child && vp lint
( no output )
Root lint block removed (only the lint block lines deleted):
$ cd apps/child && vp lint
src/bad.ts:2:9: error eslint(no-throw-literal): Expected an error object to be thrown
... [if child also has the ghost jsPlugins entry, it fails loudly instead:]
Failed to parse oxlint configuration file.
x Failed to load JS plugin: this-plugin-is-definitely-not-installed
Same behavior in vp lint --print-config: nested/root custom rules and jsPlugins never appear in the printed oxlint config when the root has a lint block.
Also worth noting: the same config in a single-package (non-monorepo) project forwards lint.jsPlugins correctly, so forwarding works in the simple case and breaks specifically with a root lint block present.
Related
- #997 — nested package
ignorePatternsdropped during config merging (closed; this may share the config-merge code path).
- Lingua principale
- Rust
- Stelle
- 6k
- Fork
- 274
- Merge medio
- 1g 13h
- PR unite (30g)
- 195
Preparare l'ambiente
Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di voidzero-dev/vite-plus
-
`npx --package=vite-plus vp create` fails with exit 127 when npm is the chosen package managerForse già presa @Crimson341 l’ha presa oggi. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
voidzero-dev/vite-plus#2970 ·
I maintainer di solito rispondono entro 1 giorno
-
pending triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
voidzero-dev/vite-plus#2882 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
voidzero-dev/vite-plus#2097 · 10 commenti · 2 reazioni ·
I maintainer di solito rispondono entro 1 giorno
-
Windows: PowerShell installer (1.1.0) does not add vite-plus\bin to user PATH — 'vp' not recognizedAperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 30/100
voidzero-dev/vite-plus#2984 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
pending triage
Difficoltà 3/5 1-2 giorni Idoneità per principianti 40/100
voidzero-dev/vite-plus#2983 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di voidzero-dev/vite-plus
Issue simili
-
ai-priority/P2 bug db/oracle user-priority/P1
Difficoltà 2/5 1-3 ore Idoneità per principianti 67/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
swc-project/swc#12516 ·
I maintainer di solito rispondono entro 1 giorno
-
app bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
-
mls-rs-crypto-awslc: exact aws-lc-rs =1.16.3 pin blocks rustls security updateForse già presa @muscariello l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100