Reputation: 1677
I have an open and saved file in VS code:
Now if I, for an example, make this line longer by adding some in-line styles, the line is automatically formatted and broken up into multiple lines upon saving the file:
I am not interested in this. I would like to avoid the single '>' char being on it´s own line, and the line breaking to take place after at least the double amount of characters per line. As far as I can see, this auto-formatting is happening because of ESLint which is included in the project. In the ESLint documentation ESLint documentation I can´t find any newline settings which affects this problem. And neither cant I find any settings in VS code File > Preferences > Settings which relates to it.
So how to turn off this quite annoying problem?
Upvotes: 0
Views: 5520
Reputation: 1
If you are using a prettier Extension,
Upvotes: 0
Reputation: 21
I faced the sample problem, and this is helping me solve the problem. On the VSCode>file->preference->setting in the search box, searching the word with "Line Length" then change the value to whatever you want :)
Upvotes: 2
Reputation: 2742
I'm not sure this is due to eslint, you need to check vscode html formatter : https://code.visualstudio.com/docs/languages/html#_formatting
Upvotes: 1