Currently, I am working on an Angular project using Visual Studio Code and encountering an irritating issue with the format document settings for Typescript files. It keeps breaking parameters to a new line:
Here is an example of the code before formatting (alt+shift+f):
this.opportunityId = this.route.snapshot.paramMap.get('opportunityid');
this.opportunityTermVendorId = this.route.snapshot.paramMap.get('vendorid');
this.opportunityTermVendorAssetId = this.route.snapshot.paramMap.get('assetid');
this.opportunityTermCollateralId = this.route.snapshot.paramMap.get('collateralid');
And here is what happens after formatting (alt+shift+f):
this.opportunityId = this.route.snapshot.paramMap.get('opportunityid');
this.opportunityTermVendorId = this.route.snapshot.paramMap.get('vendorid');
this.opportunityTermVendorAssetId = this.route.snapshot.paramMap.get(
'assetid'
);
this.opportunityTermCollateralId = this.route.snapshot.paramMap.get(
'collateralid'
);
Even though I have turned off word wrap, I have also attempted to set it to a larger value for the word wrap column. You can see my current overridden settings below:
{
"git.confirmSync": false,
"terminal.integrated.shell.windows": "C:\\Windows\\System32\\cmd.exe",
"workbench.iconTheme": "material-icon-theme",
"editor.formatOnSave": true,
"prettier.singleQuote": true,
"editor.wordWrapColumn": 180
}