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)
"editor.wordWrap": "off"
- but still i face the same behavior. I've tried to override that setting as said in the link you mentioned - but it seems to have zero effect on the settings, i'm still receiving those weird newlines. – Painmax-line-length
completely, and then restarting Visual Studio Code? – Bantustan"prettier.printWidth": 180
in the settings). – Pain"prettier.printWidth": 180
is not doing its job. – Pain