Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

299
Vistas
How do I run prettier on a specific subdirectory on my project?

I have a typescript project structure something like this:

--workflows
    |--app1
         |--src
    |--app2
         |--src

I am trying to run prettier, but I only want to run on app1.

I tried something like this:

prettier --write \"workflows/app1/**/*.{js, ts}\"

This doesn't return any files.

But if I run something like this:

prettier --write \"workflows/**/*.{js, ts}\"

It returns all files under workflows directory.

What am I doing wrong? How can I get it to run only for files under app1?

about 4 years ago · Juan Pablo Isaza
2 Respuestas
Responde la pregunta

0

It worked without using quotes

prettier --write workflows/app1/**/*.{js, ts} 

Json looks like this:

"scripts": {
    "review": "prettier --write workflows/app1/**/*.{js,ts}"
    }
about 4 years ago · Juan Pablo Isaza Denunciar

0

According to the docs you can use a .prettierignore file in the root of your project: https://prettier.io/docs/en/ignore.html

Simply create a file called .prettierignore and type the directories you want to exclude in your case:

app2

You can also use the --ignore-path option in the CLI

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda