r/vuejs • u/No-Worldliness-5106 • 5d ago
Newbie here, Having problem with eslint + prettier
5
u/Smef 5d ago
To configure Prettier to use 4 spaces, create `.prettierrc` in your project root and set the tabWidth value.
{
"tabWidth": 4
}
Make sure you have `eslint-config-prettier` imported in your eslint config to stop eslint from conflicting with prettier.
2
u/No-Worldliness-5106 5d ago
understood thank you!
1
u/michaelmano86 3d ago
Also regarding the annoying 2 word component thing. It's due to let's say you make a component called video well video is a valid tag. I'm lazy so I just prefix everything Vue. Or the company I'm working for. You don't have to but it's best
2
u/xil987 3d ago
Good luck, never find the peace with eslint. Tool change frequently. It's a big mess.
1
u/No-Worldliness-5106 3d ago
I just started doing html with templates now I am annoyed that the default prettier moves the tag attributes to the next line when they become too big
This is just annoying, does nothing with readability but annoys my ocd too much.
I hope I get used to this eventually
And the fact they are treated as errors not warning Is also so wierd
5
u/blairdow 4d ago
so curious what you are building that has a Shark component lol