{ //为了符合eslint的两个空格间隔原则 "editor.tabSize": 2, //配置eslint "files.autoSave": "off", "eslint.run": "onSave", // 控制是否将打开的编辑器显示为预览。预览编辑器将会重用至其被保留(例如,通过双击或编辑),且其字体样式将为斜体。 "workbench.editor.enablePreview": false, "search.exclude": { "**/dist": true, "**/static": true }, "workbench.colorCustomizations": { "activityBar.background": "#332A3A", "titleBar.activeBackground": "#473B52", "titleBar.activeForeground": "#FBFAFB" }, "eslint.enable": true, "editor.codeActionsOnSave": { "source.fixAll": true, "source.fixAll.eslint": true }, "editor.formatOnSave": false, // "rvest.vs-code-prettier-eslint" "vetur.format.options.tabSize": 2, "vetur.format.options.useTabs": false, "vetur.format.defaultFormatterOptions": { "prettier": { "singleQuote": true, "semi": false, "trailingComma": "none", "arrowParens": "avoid", "printWidth": 100, "bracketSpacing": true, "htmlWhitespaceSensitivity": "ignore", // 关键配置:函数名后添加空格 "spaceBeforeFunctionParen": true // 设置为 true 添加空格 }, "stylus-supremacy": { "insertColons": false, "insertSemicolons": false } }, // "vetur.format.defaultFormatter.js": "prettier-eslint", "[javascript]": { "editor.defaultFormatter": "rvest.vs-code-prettier-eslint" } }