I'm using VsCode with Prettied Extension. Prettier in some cases is formatting inside the HTML element (I.g. Class value), which is annoying, because its breaking the property in multiple lines unnecessarily, Hence:
I don't want to use “prettier-ignore” comments for every line in code because its tedious and
I don't want to use .prettierignore file in root, because in my understanding it ignores the HTML files and also turn off vscode's default HTML formatter.
I want to allow prettier for all the languages except for HTML, so I put a file with the extension .prettierrc in project root with the content as following:
{
"editor.defaultFormatter": "esbenp.prettier-vscode",
"[html]": {
"editor.defaultFormatter": null
}
}
Now my question is:
Can I use .prettierignore file in root, if so, will it disable vscode's HTML default formatter?
Check my .prettierrc config file and let me know if its the right (or another) way.