vscode下vue项目中eslint的使用方法(2)

// 将设置放入此文件中以覆盖默认设置 { "editor.fontSize": 12, "editor.tabSize": 2, "files.associations": { "*.vue": "vue" }, "eslint.autoFixOnSave": true, "eslint.options": { "extensions": [ ".js", ".vue" ] }, "eslint.validate": [ "javascript", "javascriptreact", { "language": "html", "autoFix": true }, { "language": "vue", "autoFix": true } ], "vetur.validation.template": false, "vetur.format.defaultFormatterOptions": { "js-beautify-html": { // 属性列太长才折行,默认的force-expand-multiline不美观 "wrap_attributes": "auto" }, "prettier": { //去掉代码结尾分号 "semi": false, //使用eslint的代码格式进行校验 "eslintIntegration": true, //采用单引号 "singleQuote": true } }, //格式化.vue中html,js "vetur.format.defaultFormatter.html": "js-beautify-html", "vetur.format.defaultFormatter.js": "vscode-typescript", //让函数(名)和后面的括号之间加个空格 "javascript.format.insertSpaceBeforeFunctionParenthesis": true, "search.exclude": { "**/Node_modules": true, "**/bower_components": true, "**/dist": true }, "git.confirmSync": false, "window.zoomLevel": 0, "editor.renderWhitespace": "boundary", "editor.cursorBlinking": "smooth", "editor.minimap.enabled": true, "editor.minimap.renderCharacters": false, "editor.fontFamily": "'Droid Sans Mono', 'Courier New', monospace, 'Droid Sans Fallback'", "window.title": "${dirty}${activeEditorMedium}${separator}${rootName}", "editor.codeLens": true, "editor.snippetSuggestions": "top", "workbench.colorTheme": "Solarized Light", "extensions.ignoreRecommendations": false }

参考 :

eslint-plugin-vue: https://eslint.vuejs.org/user-guide/

总结

以上就是这篇文章的全部内容了,希望本文的内容对大家的学习或者工作具有一定的参考学习价值,如果有疑问大家可以留言交流,谢谢大家对脚本之家的支持。

您可能感兴趣的文章:

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:http://www.heiqu.com/d1589e920067e9123bcf1d43c87cd1be.html