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

245
Vistas
How to have Prettier format two JSX and JS separately within the same file in React

Is there any way to have Prettier format JavaScript differently than the JSX in React in the same file, mainly just making the tabWidth for JS 4 and for JSX 2?

Should I be changing the file extension to .jsx and not .js, or will this at least make it so that if I move all my components to be rendered entirely in their own file with props, I can call those .jsx files and it will format them with tabWidth 2 and then keep functions and other things in a separate JS file that will be formatted with tabWidth 4?

about 4 years ago · Juan Pablo Isaza
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