Configuring VS Code ESLint1:52
So yeah, if you're making use of VS Code like I am, and you want to get rid of this linting error, actually in the Vite app, let's go ahead and do that. So first, make sure you have these extensions installed. Make sure you have ESLint. And make sure you have Vuter. And if you go into the docs here, it says make sure you have this in your config. And if you go into my config, I already have that. So I'll open up my settings. And what was it? ESLint.validate.
Adding Vue 3 ESLint Rules3:10
we want the Vue 3 rules. So let's do that. Okay. Let me run my dev server again. And then what else? We have to make an .eslintrc file. So let's add that. You can also make it a .js file if you want, but I'll just stick to this. Back to our code. Let's add that.
Creating .eslintrc Config3:28
Back to our code. Let's add that .eslintrc. Let's paste that in. And I don't want this rule. Let me just comment this out. And for the Vue recommended, we want the Vue 3 recommended settings. So I believe it's like that. So now if I save this and this is still here, I might have to restart my VS Code. So let's try that.
Restarting and Fixing Warnings3:46
So now if I save this and this is still here, I might have to restart my VS Code. So let's try that. Okay. So that linting error is gone, but now we have this other warning here. So if I just save it, that should auto reformat it. And it does. So definitely take advantage of multiple root nodes when you're using Vue 3.
