Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

538
Visualizações
How to prevent npm run lint from fixing errors automatically?

I created a Vue3 app using the Vue CLI with a Prettier/Eslint setup. When modifying the main.ts file to

import { createApp } from "vue";
import App from "./App.vue";
import router from "./router";

createApp(App)
.use(router).mount("#app");

and run npm run serve I get the following warning

6:15 warning Delete ⏎ prettier/prettier

as expected. Running npm run lint fixes it. But which flag is required to only check for the style?

I have a GitHub action workflow checking the code style and using npm run lint is wrong because the workflow fixes the code style and passes.

When searching for a flag I run npx vue-cli-service help lint which tells me to use --no-fix

enter image description here

but running npm run lint --no-fix it still fixes the file

enter image description here

So which command should I use inside my GitHub action to ensure the workflow fails on invalid code style?

over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

You have to use a double dash before your arguments, so use npm run lint -- --no-fix with -- as extra prefix instead of npm run lint --no-fix. See also this answer.

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda