Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

301
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!