I'm using Angular Essentials by John Papa - in particular, Tslint and Prettier. For some reason, it transforms this code
this.rM.hA = this.rM.startHA + 2 * diffX * 360 / size;
this.rM.vA = Math.max(Math.min(this.rM.startVA + 2 * diffY * 180 / size, 90), -90);
into this
this.rM.hA =
this.rM.startHA + 2 * diffX * 360 / size;
this.rM.vA = Math.max(
Math.min(
this.rM.startVA + 2 * diffY * 180 / size,
90
),
-90
);
How can i avoid it? I've tried to play with tslint.json settings:
"max-line-length": [true, 165]
But that one does not affect in my case.
EDIT: as following the similar issue I've tried to set both "prettier.printWidth"
and "editor.wordWrap"
, but none of them helped. I've removed max-line-length
, as suggested by @ConnorsFan, and my current Workspace Settings (which should override Users Settings, right?) is
{
"prettier.printWidth": 180,
"editor.wordWrap": "bounded",
"editor.wordWrapColumn": 180 }
EDIT2: it appears, problem is caused by Prettier extension (comes as dependency for Angular Essentials). Now the problem is narrowed to realize, why "prettier.printWidth": 180
is not working. I've opened an issue https://github.com/prettier/prettier/issues/3228
PS: The names have been changed to protect the innocent. (c)
A quick fix is to go to Prettier Extension Settings (ctrl + shift + X) and in Prettier Extension Settings search for "Print Width" set it to 250 or anything that works for you.
"prettier.printWidth": 120
worked for me with only having two javascript format extensions 'Prettier' & 'ESlint' in my vscode.
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