vscode 下载地址:https://code.visualstudio.com/Download
eslint 配置
下载一下:vetur,eslint,prettier
点击左下角设置按钮搜索:eslint
配置如下
// 将设置放入此文件中以覆盖默认设置
{
"sublimeTextKeymap.promptV3Features": true,
"javascript.implicitProjectConfig.experimentalDecorators": true,
"editor.multiCursorModifier": "ctrlCmd",
"editor.snippetSuggestions": "top",
"editor.formatOnPaste": true,
"editor.tabSize": 2,
"editor.fontSize": 15,
"editor.formatOnSave": false,
"editor.acceptSuggestionOnEnter": "off",
"window.zoomLevel": -1,
"editor.renderWhitespace": "none",
"editor.renderControlCharacters": true,
"workbench.colorTheme": "One Dark Pro",
"editor.minimap.enabled": true,
"files.exclude": {
"**/.git": true,
"**/.svn": true,
"**/.hg": true,
"**/CVS": true,
"**/.DS_Store": true,
"**/tmp": true,
"**/node_modules": true,
"**/bower_components": true
},
"files.watcherExclude": {
"**/.git/objects/**": true,
"**/.git/subtree-cache/**": true,
"**/node_modules/**": true,
"**/tmp/**": true,
"**/bower_components/**": true
},
"workbench.colorCustomizations": {
"tab.activeBackground": "#be0a4c"
},
"explorer.autoReveal": false,
"explorer.confirmDelete": false,
// eslint
"eslint.validate": [
"html",
{
"language": "vue",
"autoFix": true
},
{
"language": "javascript",
"autoFix": true
},
{
"language": "javascriptreact",
"autoFix": true
},
{
"language": "typescript",
"autoFix": true
},
{
"language": "json",
"autoFix": true
}
],
"eslint.options": {
},
// vetur
"vetur.format.defaultFormatter.html": "js-beautify-html",
"vetur.format.defaultFormatterOptions": {
"wrap_attributes": "force-aligned"
},
"vetur.format.defaultFormatter.js": "prettier-eslint",
"vetur.experimental.templateInterpolationService": false,
"workbench.startupEditor": "welcomePage",
"editor.accessibilitySupport": "off",
"explorer.confirmDragAndDrop": false,
"files.associations": {
"*.cjson": "jsonc",
"*.wxss": "css",
"*.wxs": "javascript",
"*.wpy": "vue"
},
"emmet.includeLanguages": {
"wxml": "html"
},
"minapp-vscode.disableAutoConfig": true,
"javascript.updateImportsOnFileMove.enabled": "always",
"javascript.format.enable": false,
"prettier.semi": false,
"prettier.jsxSingleQuote": true,
"prettier.singleQuote": true,
"breadcrumbs.enabled": true,
"prettier.printWidth": 240,
"eslint.autoFixOnSave": true,
"scss.lint.duplicateProperties": "warning",
"scss.lint.zeroUnits": "warning",
"fileheader.Author": "lu",
"fileheader.LastModifiedBy": "lu",
"[json]": {
"editor.defaultFormatter": "vscode.json-language-features"
},
"sync.gist": "e25f5b82bc1db4aad79a24ca77e34b7c",
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
"dart.flutterSdkPath": "/Users/apple/D/flutter/flutter",
"todo-tree.tree.showScanModeButton": false
}
node8的下载链接:https://nodejs.org/dist/v8.12.0/