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

293
Vistas
Correctly format unpacked object properties of function parameters in the IDE JetBrains WebStorm

I use the the IDE PhpStorm from JetBrains, which also includes WebStorm.

When coding a React/Next.js app it's offen necessary to unpack object properties of function parameters.

But currently the IDE messes up the formation of the properties, if the are in multiple lines.

The desired output:

export default function SomeComponent({
  children,
  home,
}: SomeComponentProps) {
  return (
   <>Something...</>
  );
}

But thas the actual outputted, if I use reformat:

export default function SomeComponent({
                                         children,
                                         home,
                                      }: SomeComponentProps) {
  return (
   <>Something...</>
  );
}

Within the IDE settings I use the Google JavaScript Style Guide for JavaScript and TypeScript:
enter image description here

Within a Next.js project I tried a combination of ESLint and prettier:

{
  "extends": [
    "eslint:recommended",
    "google",
    "next/core-web-vitals",
    "prettier"
  ],
  "rules": {
    "require-jsdoc": "off"
  }
}

Is there anyway to archive the desired output?

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

0

please try disabling Align when multiline for Function declaration parameters in Settings | Editor | Code Style | JavaScript | Wrapping and Braces

enter image description here

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