Skip to content

Objects in ternary operator cause mixing of spaces and tabs #4874

@saarmae

Description

@saarmae

Prettier 1.12.1
Playground link

--single-quote
--tab-width 4
--trailing-comma all
--use-tabs

Input:

const dog = condition ? {
	key: value1,
} : {
	key: value2,
};

Output:

const dog = condition
	? {
			key: value1,
	  }
	: {
			key: value2,
	  };

Expected behavior:
Anything that does not mix spaces and tabs.

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.type:duplicateIssues that are a duplicate of a previous issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions