If you're using VScode, I recommend doing a full ESlint configuration in your project as I've explained here.
Having this ESlint extension and that in your settings.json
(accessible via Command Palette)
{
"editor.codeActionsOnSave": {
"source.fixAll": true, // this one will fix it on save for you
},
"eslint.options": {
"extensions": [
".html",
".js",
".vue",
".jsx",
]
},
"eslint.validate": [
"javascript",
"javascriptreact",
"typescript",
"typescriptreact",
"html",
"vue",
],
}
On top of a simple .eslintrc.js
file like this
module.exports = {
root: true,
env: {
browser: true,
node: true,
},
parserOptions: {
parser: '@babel/eslint-parser',
requireConfigFile: false,
},
extends: ['@nuxtjs']
}
Followed by this in the settings UI, should give you a great DX.
