每次保存时,自动修改格式添加4个空格,想修改成2个,因为eslint是两个空格缩进。
vscode->settings->Code Actions On Save-> setting.json
1 添加:
"editor.tabSize": 2,
2 If doesn't work
Go to: settings > workspace settings > Text editor
search Editor: Detect Indentation
uncheck 'Detect Indentation' to stick to your default setting.
网友评论