{
//配置vscode 的终端为 git,路径是自己的安装路径可以自己找下;
"terminal.integrated.shell.windows": "C:\\Users\\chenzj\\AppData\\Local\\Programs\\Git\\bin\\bash.exe",
// tab 大小为2个空格
"editor.tabSize": 2,
//禁止保存的时候格式化
"editor.formatOnSave": false,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
//函数名称前 加一个空格
"javascript.format.insertSpaceBeforeFunctionParenthesis": true,
//格式化插件配置,设置为vetur
"[vue]": {
"editor.defaultFormatter": "octref.vetur"
},
"vetur.format.defaultFormatterOptions": {
"js-beautify-html": {
// #vue组件中html代码格式化样式
"wrap_attributes": "force-aligned", //也可以设置为“auto”,效果会不一样
"wrap_line_length": 200,
"end_with_newline": false,
"semi": true,
"singleQuote": true
},
"prettier": {
//设置分号
"semi": true,
//双引号变成单引号
"singleQuote": true,
//禁止随时添加逗号,这个很重要。找了好久
"trailingComma": "none"
}
},
"[javascript]": {
"editor.defaultFormatter": "vscode.typescript-language-features"
}
}
prettier 配置文件 解决自动添加逗号的问题(某马教程的来)
最新推荐文章于 2024-03-18 14:33:44 发布