The prerequisite is that you need to have esLint dependencies installed in package.json

1. Install the esLint + Vetur plugin

2. Set file == preference ==

3. Enter. Json and click setting.json

4. Add the following configuration

"eslint.validate": [
    "javascript",
    "javascriptreact",
    {
      "language": "vue",
      "autoFix": true
    },
    "vue"
  ],
  "eslint.autoFixOnSave": true
Copy the code