Skip to content

📎 Implement formatting option to include space inside parens, braces, brackets, etc. #4607

@sirreal

Description

@sirreal

Description

Add formatting option to include spacing inside parentheses, square brackets, curly braces, and angle brackets.

For example, this input:

function id<TypeArg>(x: TypeArg): TypeArg {
	return x;
}
const arr = [1, 2, 3];
if (id(true)) {
	// …
}

Would be formatted as follows with a "space inside" option enabled:

function id< TypeArg > ( x: TypeArg ): TypeArg {
	return x;
}
const arr = [ 1, 2, 3 ];
if ( id( true ) ) {
	// …
}

See #2360 (comment).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions