johnsen 10 месяцев назад
Родитель
Сommit
86075d8819
1 измененных файлов с 46 добавлено и 39 удалено
  1. 46 39
      .vscode/settings.json

+ 46 - 39
.vscode/settings.json

@@ -1,42 +1,49 @@
 {
-    //为了符合eslint的两个空格间隔原则
-    "editor.tabSize": 2,
-    //配置eslint
-    "files.autoSave":"off",
-    "editor.codeActionsOnSave": {
-      "source.fixAll": "explicit",
-      "source.fixAll.eslint": "explicit"
+  //为了符合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 添加空格
     },
-    "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": true,
-    //  "rvest.vs-code-prettier-eslint"
-    "editor.defaultFormatter":{
-      "editor.defaultFormatter": "rvest.vs-code-prettier-eslint",
-      "editor.formatOnType": false, // required
-      "editor.formatOnPaste": true, // optional
-      "editor.formatOnSave": false, // optional
-      "editor.formatOnSaveMode": "file", // required to format on save
-      "files.autoSave": "onFocusChange", // optional but recommended
-      "vs-code-prettier-eslint.prettierLast": false // set as "true" to run 'prettier' last not first
-    },
-    "vetur.format.defaultFormatter.js": "prettier-eslint",
-    "[javascript]": {
-      "editor.defaultFormatter": "rvest.vs-code-prettier-eslint"
+    "stylus-supremacy": {
+      "insertColons": false,
+      "insertSemicolons": false
     }
-  }
+  },
+  // "vetur.format.defaultFormatter.js": "prettier-eslint",
+  "[javascript]": {
+    "editor.defaultFormatter": "rvest.vs-code-prettier-eslint"
+  }
+}