vetur vue必备插件
prettier 自动格式化插件
下载依赖:
npm install --save-dev prettier
# or globally
npm install --global prettier
ESlint 有不符合规范的代码报错
下载依赖:
npm install -g eslint
进入vetur扩展设置


在settings.json中编辑

配置如下(仅供参考,根据项目实际情况配置):
{
"files.autoSave": "onFocusChange",
"[html]": {
"editor.defaultFormatter": "vscode.html-language-features"
},
"editor.formatOnSave": true,
"editor.fontWeight": "normal",
"editor.formatOnPaste": true,
"workbench.editor.enablePreview": false,
"workbench.iconTheme": "vscode-icons",
"[javascript]": {
"editor.defaultFormatter": "vscode.typescript-language-features"
},
"path-autocomplete.excludedItems": {},
"path-intellisense.mappings": {},
"editor.minimap.enabled": false,
"security.workspace.trust.untrustedFiles": "open",
"window.zoomLevel": 1,
"[vue]": {
"editor.defaultFormatter": "octref.vetur"
},
"eslint.codeActionsOnSave.rules": null,
"editor.fontSize": 17, //编辑器字体大小
"[scss]": {
"editor.defaultFormatter": "michelemelluso.code-beautifier"
}, //scss格式化工具
"workbench.iconTheme": "vscode-icons", //vscode文件图标主题
"terminal.integrated.shell.windows": "C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe", //默认终端shell
"go.formatTool": "goimports", //golang格式化工具
"edit

最低0.47元/天 解锁文章
2402

被折叠的 条评论
为什么被折叠?



