vue项目中vscode安装eslint插件和错误自动修复(vue |
您所在的位置:网站首页 › vscode 安装vue插件 › vue项目中vscode安装eslint插件和错误自动修复(vue |
vue项目中vscode安装eslint插件和错误自动修复(vue-cli2.0创建的项目)
一、这是使用vue cli2.0搭建的项目的配置方法 npm install -g vue-cli vue init webpack my-pro (一路按着”enter“就行) 1、查看自己的vue项目中是否有eslint组件 (1)是否有eslintrc.js该文件; (2)查看webpack的配置文件:package.json中是否有以下配置 打开:文件》首选项》设置》搜索 ”eslint“ 》点击用户设置,即如下图标:
二、vue-cli3.0创建的项目,改配置 { "workbench.startupEditor": "newUntitledFile", "terminal.integrated.shell.windows": "C:\\Windows\\System32\\cmd.exe", "editor.multiCursorModifier": "ctrlCmd", "editor.snippetSuggestions": "top", "editor.formatOnPaste": true, "extensions.ignoreRecommendations": false, "editor.fontSize": 15, "editor.tabSize": 2, "vetur.validation.template": false, "workbench.activityBar.visible": true, "workbench.colorTheme": "Eclipse", "javascript.implicitProjectConfig.experimentalDecorators": true, "[vue]": {}, "svn.enableProposedApi": "product", "files.associations": { "*.vue": "vue" }, "eslint.autoFixOnSave": true, "eslint.validate": [ "javascript", "javascriptreact", { "language": "html", "autoFix": true }, { "language": "vue", "autoFix": true } ], "terminal.integrated.rendererType": "dom" } |
今日新闻 |
推荐新闻 |
CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3 |