Nek*_*u80 5 typescript visual-studio-code angular prettier
我想知道是否有规则在带有 prettier 的打字稿中的函数/语句和注释之间添加新行(项目根目录下的 .prettierrc )。
当前行为:
} else if (request.type === 'membership-fee') {
/**
* If type is membership fee
*/
this.form.get('total')?.setValue(this.gym?.membership_fee?.total);
} else {
/**
* Operation type not recognized
*/
this.toast.error('Tipo di operazione non riconosciuto');
($('#editSaleModal') as any).modal('hide');
}
Run Code Online (Sandbox Code Playgroud)
期望的行为:
} else if (request.type === 'membership-fee') {
/**
* If type is membership fee
*/
this.form.get('total')?.setValue(this.gym?.membership_fee?.total);
} else {
/**
* Operation type not recognized
*/
this.toast.error('Tipo di operazione non riconosciuto');
($('#editSaleModal') as any).modal('hide');
}
Run Code Online (Sandbox Code Playgroud)
我当前的 .prettierc:
{
"useTabs": true,
"tabWidth": 4,
"printWidth": 120
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
6271 次 |
| 最近记录: |