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

300
Visualizações
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 Respostas
Responde à pergunta

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 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