vscode設置保存校驗eslint


{
  "workbench.iconTheme": "material-icon-theme",
  "explorer.confirmDragAndDrop": false,
  "explorer.confirmDelete": false,
  //配置eslint
  "eslint.autoFixOnSave": true, //  啟用保存時自動修復,默認只支持.js文件
  "eslint.validate": [
    "javascript", //  用eslint的規則檢測js文件
    {
      "language": "vue", // 檢測vue文件
      "autoFix": true //  為vue文件開啟保存自動修復的功能
    },
    {
      "language": "html",
      "autoFix": true
    },
  ],
  "editor.codeActionsOnSave": {
    "source.fixAll.eslint": true
  },
  "files.associations": {
  
    "*.cjson": "jsonc",
    "*.wxss": "css",
    "*.wxs": "javascript"
  },
  "emmet.includeLanguages": {
    "wxml": "html"
  },
  "minapp-vscode.disableAutoConfig": true
}

 


免責聲明!

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



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