Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

`vp migrate --full` asks to set up pre-commit hooks even when they're already configured

Aperta Adatta ai principianti
#3,096 0 commenti 2 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
74/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
rust

Direzione di ricerca

Inizia leggendo promptGitHooks() e il controllo esistente hasExistingViteHooksPolicy() usato da setupGitHooks(). Segui il modo in cui vp migrate --full gestisce gli hook esistenti e cerca i test pertinenti del prompt. Il lavoro è completato quando gli hook Vite+ esistenti vengono riconosciuti e all’utente non viene più chiesto di configurarli come se fossero assenti.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

contribution welcome

Description

In a project that already has Vite+ hooks (.vite-hooks/pre-commit, core.hooksPath=.vite-hooks/_), vp migrate --full still asks:

◇ Set up pre-commit hooks to run formatting, linting, and type checking with auto-fixes?
  Yes / No

It defaults to Yes and doesn't say hooks already exist. Answering No sounds like it might disable them, though it doesn't.

The agent prompt in the same run detects the existing file and offers Append/Skip:

› Agent instructions already exist at AGENTS.md.
    Append
  › Skip: Leave existing file unchanged

promptGitHooks() doesn't check hasExistingViteHooksPolicy(), which setupGitHooks() already uses to leave the hook as it is.

Suggested solution

When existing Vite+ hooks are detected, either:

  • Skip the prompt and log Git hooks already configured, or
  • Say so in the prompt and offer Keep/Skip, like the agent prompt does.

Additional context

Validations

  • Read the Contributing Guidelines.
  • Confirm this request is for Vite+ itself and not for Vite, Vitest, tsdown, Rolldown, or Oxc.
  • Check that there isn't already an issue requesting the same feature.
Lingua principale
Rust
Stelle
6.3k
Fork
283
Merge medio
1g 11h
PR unite (30g)
200

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di voidzero-dev/vite-plus

Tutte le issue di voidzero-dev/vite-plus

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.