1- Install ESLint in vscode 2- Turn on ESLint detection in the vue project, in the vue.config.js file

  lintOnSave: true,

3- Below is my vscode configuration file settings.json file

{// VsCode theme configuration "editor.tabSize": 2, "eslint.autoFixOnSave": true, // Repair code in ESLint format each time you save "editor.lineHeight": 24, "editor.renderLineHighlight": "none", "editor.renderWhitespace": "none", "editor.fontFamily": "Consolas", "editor.fontSize": 13, "editor.cursorBlinking": "smooth", "editor.multiCursorModifier": "ctrlCmd", "editor.formatOnSave": true, "editor.quickSuggestions": { "other": true, "comments": true, "strings": False}, "prettier.semi": true, // Remove semicolon at end of code "prettier.singlequote ": False, / / using single quotes instead of double quotes "javascript. The format. InsertSpaceBeforeFunctionParenthesis" : True, / / function (name) and add a space between the brackets behind the "vetur. Format. DefaultFormatter. HTML" : "Js - beautify - HTML / / format. The vue HTML" vetur. Format. DefaultFormatterOptions ": {" js - beautify - HTML" : {" wrap_attributes ": "Force-aligned" // attribute forces line alignment}}, "eslint.validate": [ "javascript", "javascriptreact", "html", "vue", ], "editor.codeActionsOnSave": { "source.fixAll.eslint": }, "debug.console.fontSize": 14, "git. Path ": "F:/Program Files/ git /bin/git. Exe ", //git path configuration