vscode安装eslint插件
{
// git安装路径
"git.path": "D:/Git/cmd/git.exe",
// 设置本地服务的端口号
"liveServer.settings.port": 8088,
// 设置根目录,也就是打开的文件会在该目录下找
"liveServer.settings.root": "/",
// 设置默认打开的浏览器
"liveServer.settings.CustomBrowser": "chrome",
"liveServer.settings.AdvanceCustomBrowserCmdLine": "chrome --incognito --remote-debugging-port=9222",
"liveServer.settings.NoBrowser": false,
"liveServer.settings.ignoreFiles": [
// 设置忽略的文件
"/aaaaaaaa.js"
// "/b.js"
],
"workbench.colorTheme": "Dracula",
"editor.detectIndentation": false,
"files.autoSave": "off",
"files.eol": "\r\n",
"editor.fontSize": 16,
"window.zoomLevel": 0,
"workbench.sideBar.location": "left",
"workbench.startupEditor": "newUntitledFile",
// vue文件格式化
"vetur.format.options.tabSize": 4,
"vetur.format.options.useTabs": false, // 不使用tab
"vetur.format.defaultFormatterOptions": {
// "js-beautify-html": {
// "wrap_attributes": "force-expand-multiline"
// },
// "prettyhtml": {
// "printWidth": 100,
// "singleQuote": false,
// "wrapAttributes": false,
// "sortAttributes": false
// }
"prettier": {
"semi": true, // 加分号
"singleQuote": true // 使用单引号
}
},
// eslint相关
"eslint.nodePath": "D:/node-v11.0.0-win-x64",
// 工作区单独配置 如果项目是html格式,而且没有.eslintrc.js文件 则在工作区配置中配置此项
// "eslint.options": {
// "configFile": "D:/eslintconfig/.eslintrc.js",
// "plugins": [
// "html"
// ]
// },
// 工作区单独配置 如果项目是html格式,而且没有.eslintrc.js文件 则在工作区配置中配置此项
"eslint.validate": [
"javascript",
"javascriptreact",
"html",
"vue"
],
"files.associations": {
"*.cjson": "jsonc",
"*.wxss": "css",
"*.wxs": "javascript"
},
"emmet.includeLanguages": {
"wxml": "html"
},
"minapp-vscode.disableAutoConfig": true,
"emmet.triggerExpansionOnTab": true,
"liveServer.settings.donotShowInfoMsg": true
}