How to configure vscode indentation to be consistent with the team

I found out that my .vue files were indented with 4 spaces by default, and the new project eslint was configured with two, and the eslint verification was always popular.
So, configure the setting.json in the root directory of the project

{
    
    
	//符合eslint的两个空格间隔原则
	"editor.tabSize": 2,
	//因为vscode默认启用了根据文件类型自动设置tabsize的选项,在设置中还需要添加如下一行用来关掉默认tabSize:
	"editor.detectIndentation": false
}

Reference: VSCode configure ESLint

Guess you like

Origin blog.csdn.net/taozi550185271/article/details/109448984