vscode 最簡單實用的setting.json默認配置項


vscode 最簡單實用的默認配置項

eslint、prettier、vetur

setting.json文件

{
    "workbench.iconTheme": "vscode-icons",
    "files.autoSave": "afterDelay",
    "liveServer.settings.CustomBrowser": "chrome",
    "editor.formatOnSave": true,
    "html.format.indentInnerHtml": true,
    "html.format.indentHandlebars": true,
    "eslint.format.enable": true,
    "prettier.requirePragma": true,
    "[vue]": {
        "editor.defaultFormatter": "octref.vetur"
    },
    //分號
    "prettier.semi": false,
    //單引號包裹字符串
    "prettier.singleQuote": true,
    //html格式化依賴  默認為none
    "vetur.format.defaultFormatter.html": "js-beautify-html",
    //函數前加空格
    // "javascript.format.insertSpaceBeforeFunctionParenthesis": true,
    //沒有下邊這個 上邊不生效
    "vetur.format.defaultFormatter.js": "vscode-typescript",
}

自動保存后自動格式化eslint代碼格式校驗


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM