Skip to content

Nested ternary formatting - add indents back #5814

@jurosh

Description

@jurosh

Edit: I will no longer be actively participating in this thread - my reasons are explained in comment below.

Hello,

there are many - including me thinking that change to nested ternary is not best decision.

Eg threads #5476 #3018

I know there is some reasoning why nested ternary indent was removed, but it's much harder to read code now.

At least would be good to have option to remain nice formatting (from previous prettier version) - formatting of ternaries with indent and not under each other like:

condition
  ? a
  : b
  ? c
  : d

instead much easier to understand and read is:

condition
  ? a
  : b
    ? c
    : d

Metadata

Metadata

Assignees

No one assigned

    Labels

    lang:javascriptIssues affecting JSlocked-due-to-inactivityPlease open a new issue and fill out the template instead of commenting.status:needs discussionIssues needing discussion and a decision to be made before action can be taken

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions