ESLint+Prettier的配置
ESLint+Prettier的配置
安装插件
在settings.json中写下配置
{
// tab自动转换标签
"emmet.triggerExpansionOnTab": true,
"workbench.colorTheme": "Default Dark+",
"editor.tabSize": 2,
"editor.fontSize": 14,
"[vue]": {
"editor.defaultFormatter": "octref.vetur"
},
"security.workspace.trust.untrustedFiles": "open",
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit"
},
"editor.detectIndentation": false,
"editor.formatOnSave": true,
"eslint.validate": [
"javascript",
"javascriptreact",
"html",
"vue"
],
"prettier.eslintIntegration": true,
"prettier.semi": false,
"prettier.singleQuote": true,
"javascript.format.insertSpaceBeforeFunctionParenthesis": true,
"vetur.format.defaultFormatter.html": "js-beautify-html",
"vetur.format.defaultFormatter.js": "vscode-typescript",
"vetur.format.defaultFormatterOptions": {
"js-beautify-html": {
"wrap_line_length": 140,
"wrap_attributes": "auto",
"end_with_newline": false
},
"prettier": {
"printWidth": 180
}
},
"stylusSupremacy.insertColons": false,
"stylusSupremacy.insertSemicolons": false,
"stylusSupremacy.insertBraces": false,
"stylusSupremacy.insertNewLineAroundImports": false,
"stylusSupremacy.insertNewLineAroundBlocks": false,
"editor.language.brackets": [
],
"eslint.nodeEnv": "",
}