-
Notifications
You must be signed in to change notification settings - Fork 13.2k
Closed as not planned
Labels
7.0 LS MigrationBugA bug in TypeScriptA bug in TypeScriptDomain: FormatterThe issue relates to the built-in formatterThe issue relates to the built-in formatter
Milestone
Description
TS Template added by @mjbvz
TypeScript Version: 4.0.0-dev.20200720
Search Terms
- format, formatter, formatting
- indent
Abstract
When I open object literal brace after comma in function arguments and break line immediately, format results strange indent.
Example
Code I wrote is like below. And I think following indents is one of desired formats.
f(
foo, {
bar: 'qux',
},
);When I save
f(
foo, {
bar: 'qux',
},
);Desired
f(
foo, {
bar: 'qux',
},
);or
f(
foo,
{
bar: 'qux',
},
);Issue Template
- VSCode Version: 1.45.1, 1.48.0-insider
- OS Version: macOS Catalina 10.15.5
Steps to Reproduce:
- enable formatOnSave.
- write a TypeScript file like bellow
// reproduce.ts
console.log(
1, {
a: 1,
},
)- save
Does this issue occur when all extensions are disabled?: Yes
Metadata
Metadata
Assignees
Labels
7.0 LS MigrationBugA bug in TypeScriptA bug in TypeScriptDomain: FormatterThe issue relates to the built-in formatterThe issue relates to the built-in formatter