VS Code(1.22.1) + vetur + eslint + stylelint + prettierjavascript
npm install -g vue-language-server
npm install -g stylelint
npm install -g eslint
npm install -g prettier prettier-eslint
css
VS Code 配置html
{ "emmet.syntaxProfiles": { "vue-html": "html", "vue": "html" }, "eslint.autoFixOnSave": true, "eslint.options": { "extensions": [ ".js", ".vue" ] }, "eslint.validate": [ "javascript", "javascriptreact", "html", "vue", "vue-html", { "language": "vue", "autoFix": true }, { "language": "html", "autoFix": true } ], "stylelint.enable": true, "css.validate": false, "scss.validate": false, "stylelint.additionalDocumentSelectors": [ "vue" ], "vetur.format.styleInitialIndent": true, "vetur.format.scriptInitialIndent": true, "vetur.format.defaultFormatter.html": "js-beautify-html" }
工程跟目錄下配置vue
自帶格式化以後:
java