Migrate git hook & staged linting runners

Aberta
#3,274 1 comentário 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 1 dia

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
4/5
Tempo estimado
3-5 dias
Facilidade para iniciantes
48/100
Tipo de issue
Funcionalidade
Clareza
Razoavelmente clara
Status de atividade
Ativa
Stack de tecnologia
git, rust

Direção de pesquisa

Start by reading the vp migrate implementation and its existing lint-staged migration, then inspect how it detects and reads project configuration. The issue names nano-staged, husky, simple-git-hooks, lefthook, and pre-commit/prek as candidates. Done means supported configurations migrate appropriately, with a warning considered for pre-commit/prek; the exact support scope still needs discussion.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

pending triage triage: not actionable
Description

Currently, Vite+ only supports migrating lint-staged (I think?). This means that users of the following tools are not migrated:

  • nano-staged
  • husky
  • simple-git-hooks
  • lefthook
  • pre-commit/prek(?)
  • etc etc
Suggested solution

vp migrate should be able to read the configurations of those tools above and migrate them to Vite+, as appropriate.

Alternative

Users could migrate themselves, this is just a convenience factor like other migrations.

Additional context

I'm not sure if migrating pre-commit/prek is necessarily a good or at least feasible idea. Maybe just warn when pre-commit-config.yaml is detected instead?
The thing is that pre-commit (and prek, but I'll refer to it and pre-commit together) have a whole different system for doing its thing, which may be out-of-scope for Vite+. Seeking feedback, as it'd be really awesome if Vite+ could have support for the pre-commit framework, but understandable if that's considered out-of-scope. (There are various tools that use pre-commit framework, one of the biggest examples being the zizmor analyzer)

I can create a separate issue for this if needed.

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.
Linguagem predominante
Rust
Estrelas
6.5k
Forks
297
Merge médio
20h 56min
PRs com merge (30d)
234

Preparar o ambiente

Abrir no Codespaces

Inicia o contêiner de desenvolvimento do projeto no navegador, com a sua própria conta do GitHub.

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de voidzero-dev/vite-plus

Todas as issues de voidzero-dev/vite-plus

Issues semelhantes

Mais issues de Rust

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.