vscode配置 eslint +prettier
阿新 • • 發佈:2020-07-14
{
"editor.fontFamily": "Menlo, Consolas, 'Courier New', monospace",
"editor.fontLigatures": true,
"editor.fontSize": 24,
"editor.fontWeight": "500",
"editor.lineHeight": 24,
"editor.lineNumbers": "on",
"editor.minimap.enabled": false,
"editor.renderIndentGuides": false,
"editor.rulers": [120],
"editor.formatOnPaste": true,
"workbench.colorTheme": "One Dark Pro",
"explorer.confirmDelete": false,
"terminal.integrated.fontFamily": "monospace",
"editor.formatOnType": false,
"editor.formatOnSave": true,
"eslint.validate": [
"javascript",
"javascriptreact",
{
"language": "html",
"autoFix": true
},
{
"language": "vue",
"autoFix": true
},
{
"language": "typescript",
"autoFix": true
},
"typescriptreact"
],
"eslint.options": {
"plugins": ["html"]
},
"editor.tokenColorCustomizations": {
"textMateRules": [
{
"name": "Comments",
"scope": "comment, punctuation.definition.comment",
"settings": {
"fontStyle": ""
}
},
{
"name": "js/ts italic",
"scope": "entity.other.attribute-name.js,entity.other.attribute-name.ts,entity.other.attribute-name.jsx,entity.other.attribute-name.tsx,variable.parameter,variable.language.super",
"settings": {
"fontStyle": ""
}
},
{
"name": "js ts this",
"scope": "var.this,variable.language.this.js,variable.language.this.ts,variable.language.this.jsx,variable.language.this.tsx",
"settings": {
"fontStyle": ""
}
}
]
},
"files.autoSave": "off",
"window.zoomLevel": 0,
"terminal.integrated.shell.windows": "C:\\Windows\\System32\\cmd.exe",
"search.location": "panel",
// prettier外掛 自動化格式程式碼設定
"prettier.eslintIntegration": true,
"prettier.singleQuote": true, // 強制單引號
"prettier.trailingComma": "none", // 尾隨逗號
"prettier.semi": false, // 結尾不加分號
"prettier.tabWidth": 2, // 2格縮排
"prettier.arrowParens": "always", // 圍繞箭頭函式引數強制使用括號
"editor.detectIndentation": false,
"editor.tabCompletion": "on",
"liveServer.settings.donotShowInfoMsg": true,
"typescript.updateImportsOnFileMove.enabled": "always",
// vetur格式化外掛的配置
"vetur.format.defaultFormatter.html": "js-beautify-html",
"vetur.format.defaultFormatter.js": "vscode-typescript"