{
//vscode默认情况下,启用根据文件类型自动设置tabsize的选项
' editor.detect indentation ' : false,
重新设置tabsize
' editor.tabSize':4,
//#如果值设置为true,并且每次保存时自动设置格式的值设置为false,请按shift alt F键格式化代码
' editor.formatOnSave':false,
//#每次保存时都以eslint格式修复代码
' eslint.autoFixOnSave':true,
添加//vue支持
' eslint.validate':[
' javascript ',
' javascriptreact ',
{
'语言' : ' vue ',
' autoFix':true
}
]、
//#请prettier使用eslint的代码格式进行检查
' prettier.eslintintegration ' : true,
//#拆下代码的最后一个分号
' prettier.semi':false,
//#用引号代替双引号
' prettier.singleQuote':true,
' prettier.tabWidth':4,
//#在函数(名称)和后面的括号之间加入空格
' JavaScript.format.insertspacebeforefunctionparenthesis ' : true,
//#这是用户自己的习惯选择的
' vetur.format.default formatter.html ' : ' js-beautify-html ',
//#将vue的js格式化为“prettier”
' vetur.format.default formatter.js ' : ' prettier ',
' vetur.format.defaultformatteroptions ' : {
' js-beautify-html':{
//#vue组件中html代码的格式样式
' wrap_attributes':'auto ',//'//html标记属性换行设置[ auto|force-aligned ] (自动扩展-多行)
设置' wrap_line_length':0,//多个字符后,换行符0表示忽略
在' end_with_newline':false,//文件末尾添加新行
' semi':false,
'单队列' : true
(,
' prettier':{
' semi':false,
'单队列' : true
}
(,
' [jsonc]':{
' editor.default formatter ' : ' ESB enp.prettier-vs代码'
(,
要设置stylus格式,需要Manta'sStylusSupremacy插件
是否插入' stylus supremacy.insert colons ' : false,//冒号
是否加入' stylus supremacy.insert semicolons ' : false,//分号
是否插入' stylus supremacy.insert braces ' : false,//大括号
是否在' stylus supremacy.insertnewlinearoundimports ' : false,//import之后换行
' stylus supremacy.insertnewlinearoundblocks ' : false,
' prettier.useTabs':false,
' files.auto save ' : ' after delay ',
' explorer.confirm delete ' : false,
' [javascript]':{
' editor.default formatter ' : ' ESB enp.prettier-vs代码'
(,
' [json]':{
' editor.default formatter ' : ' ESB enp.prettier-vs代码'
(,
' diff editor.ignoretrimwhitespace ' : false,
是否在' vetur.format.options.tabsize ' :4//两个选择器中换行
}