前言
爲了規範寫法,開啓了eslint,可是tab沒設置轉空格,這裏記錄下設置過程。json
步驟
進入設置並搜索tab
配置設置
複製相應的設置spa
寫入到json文件中eslint
"editor.detectIndentation": false, //關閉檢測第一個tab後面就tab
"editor.renderControlCharacters": true, //製表符顯示->
"editor.renderWhitespace": "all", //空格顯示...
"editor.tabSize": 4,//tab爲四個空格
"editor.insertSpaces": true //轉爲空格
直接修改
點擊更改視圖配置空格code