I've been using prettier
for near 2 years now to format my angular
code. Starting last week prettier
starts to insert a new line behind all angular
statements with decorators like @Input()
, @Output()
, @ViewChild()
,..
resulting in something like
@Input()
property1
@Output()
emitter
which doubles the line count and doesn't add to readability.
My prettier
settings are:
"editor.tabSize": 2,
"prettier.singleQuote": true,
"prettier.tabWidth": 2,
"prettier.useTabs": false,
"prettier.semi": true,
"prettier.printWidth": 120,
"prettier.eslintIntegration": true,
Event when I reset to default settings, this new line thing still occurs. Does anybody has suggestions? Thanks.
I found the following related open feature request: https://github.com/prettier/prettier/issues/1974
It looks like, for now, they do not have an option to change the behaviour...
According to Angular style guideline, it should be on one line: https://angular.io/guide/styleguide#decorate-input-and-output-properties
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With