{
// vscode默认启用了根据文件类型自动设置tabsize的选项
"editor.detectIndentation": false,
// #每次保存的时候将代码按eslint格式进行修复
"eslint.autoFixOnSave": true,
// 添加 vue 支持
"eslint.validate": [
"javascript",
"javascriptreact",
{
"language": "vue",
"autoFix": true
}
],
"window.zoomLevel": 1,
// #让prettier使用eslint的代码格式进行校验
"prettier.eslintIntegration": true,
"vetur.format.defaultFormatter.stylus": "stylus-supremacy",
// #这个按用户自身习惯选择
"vetur.format.defaultFormatter.html": "js-beautify-html",
// #让vue中的js按编辑器自带的ts格式进行格式化
"vetur.format.defaultFormatter.js": "vscode-typescript",
"vetur.format.defaultFormatterOptions": {
"js-beautify-html": {
"wrap_attributes": "force-aligned"
// #vue组件中html代码格式化样式
}
},
// 写 stylus 时插入冒号
"stylusSupremacy.insertColons": false,
// 写 stylus 时插入分号
"stylusSupremacy.insertSemicolons": false,
// 写 stylus 时插入大括号
"stylusSupremacy.insertBraces": true,
// 并列的选择器新加一行
"stylusSupremacy.insertNewLineBetweenSelectors": true,
// 样式块中间空行
"stylusSupremacy.insertNewLineAroundBlocks": false,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
"editor.fontSize": 13
}
vscode eslint vue
最新推荐文章于 2024-03-29 09:45:49 发布