Lint
Lint
Lint checa o código sem executá-lo. Ele encontra possíveis bugs, padrões inseguros, problemas de estilo e regras de projeto quebradas.
Outro exemplo
Antes da revisão, o lint encontra uma Promise sem tratamento, uma imagem inacessível e um import de um módulo que só funciona no servidor.
Partes principais
- 01Code or behavior under test
- 02Observable evidence
- 03Coverage, failure, and recovery
Use-o quando
Executar regras estáveis em editores e CI. Limitar correções automáticas a mudanças seguras e previsíveis.
Não o use quando
Não habilite regras barulhentas, trate o lint como testes ou corrija arquivos não relacionados durante trabalho focado.
Nome usado no código
AST rules + diagnostics + optional autofix Antes de lançar
Check the environment and prepared test data (fixture). Define a result you can observe, failure and edge cases, isolation, stable inputs, useful error details, and cleanup. Set a time budget, owner, and flaky-test rule.
Outcome: Complete the task with Lint (Lint). User context: Antes da revisão, o lint encontra uma Promise sem tratamento, uma imagem inacessível e um import de um módulo que só funciona no servidor. Validation approach: Lint (Lint). Why it fits: Executar regras estáveis em editores e CI. Limitar correções automáticas a mudanças seguras e previsíveis. Do not use it when: Não habilite regras barulhentas, trate o lint como testes ou corrija arquivos não relacionados durante trabalho focado. Test requirements: Name the system and test environment. Define prepared test data, other inputs, and the result you can observe. Include failure and edge cases, allowed error, isolation, and cleanup. Test operations: Make failures easy to diagnose. Control random or changing inputs. Name an owner. Keep the test fast and simple enough for its release gate. Acceptance criteria: The test fails for the known bug and passes after the fix. It repeats in the target environment, gives useful evidence, and does not expose or change unrelated data. Evidence and limits (evidence boundary): Nenhum padrão oficial único controla todo o termo. Seu significado pode mudar entre equipes, plataformas ou frameworks. Unknowns to confirm: Release gate, environment, prepared test data, allowed error, time budget, owner, and flaky-test rule.
Conferir este pedido
Review how Lint (Lint) is used now. Definition: Lint checa o código sem executá-lo. Ele encontra possíveis bugs, padrões inseguros, problemas de estilo e regras de projeto quebradas. Release checks: Check the environment and prepared test data (fixture). Define a result you can observe, failure and edge cases, isolation, stable inputs, useful error details, and cleanup. Set a time budget, owner, and flaky-test rule. Before changing code, list the evidence, gaps, severity, and the smallest safe fix.