Home > Software design >  IntelliJ: Additional indent in function arguments
IntelliJ: Additional indent in function arguments

Time:09-01

When I use Reformat File in IntelliJ Idea, IDE adds additional space in function argument to align it in one line with function.

I can't find option in Code Style to disable in on change configuration.

Code:

export const getApplicationFormInstance = ({
                                             consents,
                                             dealer_code,
                                             source,
                                             rent_subscription,
                                             comment = null,
                                             ...baseOptions
                                           }: IApplicationFormOptions): FormInstanceType<IApplicationModel> => {
  return false;
}

Screenshot of Error from ESLint:

Screenshot of Error

I try to find way to fix it in IDE, not in ESLint like: "@typescript-eslint/indent": "off"

CodePudding user response:

  1. Select the code you want to format differently.
  2. Type Alt Enter and invoke Adjust code style settings
  3. Under the Wrapping and Braces tab uncheck the Align when multiline checkbox

That should get you the formatter behaviour you want.

  • Related