vscode安裝ESlint配置


先安裝插件ESLint,后面在設置setting.json中配置加入代碼:

{
"files.autoSave": "afterDelay",
"editor.suggestSelection": "first",
"vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue",
"git.path": "E:/git/Git/bin/git.exe",
"window.zoomLevel": 0,
"editor.formatOnSave": false,
"eslint.options":{
"extensins":[
".js",
".vue"
]
},
"eslint.validate": [
"javascript",
{
"language": "html",
"autoFix": true
},
{
"language": "vue",
"autoFix": true
},
],
"eslint.autoFixOnSave": true,
}
項目中安裝eslint校驗后軟件配置好后保存時會自動格式化代碼,多按保存,每次會處理一部分校驗代碼,最后有報紅的單獨處理即可


免責聲明!

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



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