Przeglądaj źródła

refactor: modify configuration of the editor

gin 5 dni temu
rodzic
commit
0024459709

+ 1 - 1
frontend/.editorconfig → .editorconfig

@@ -5,6 +5,7 @@ root = true
 charset = utf-8
 indent_style = space
 indent_size = 2
+tab_width = 2
 end_of_line = lf
 insert_final_newline = true
 trim_trailing_whitespace = true
@@ -12,4 +13,3 @@ trim_trailing_whitespace = true
 [*.md]
 insert_final_newline = false
 trim_trailing_whitespace = false
-

+ 12 - 0
.vscode/extensions.json

@@ -0,0 +1,12 @@
+{
+  "recommendations": [
+    "EditorConfig.EditorConfig",
+    "esbenp.prettier-vscode",
+    "dbaeumer.vscode-eslint",
+    "stylelint.vscode-stylelint",
+    "Vue.volar",
+    "bradlc.vscode-tailwindcss",
+    "mikestead.dotenv",
+    "antfu.iconify"
+  ]
+}

+ 26 - 15
frontend/web/.vscode/settings.json → .vscode/settings.json

@@ -1,32 +1,43 @@
 {
-  "editor.formatOnType": true,
-  "editor.formatOnSave": true,
-  "[vue]": {
-    "editor.defaultFormatter": "esbenp.prettier-vscode"
-  },
+  "editor.detectIndentation": false,
   "editor.tabSize": 2,
+  "editor.defaultFormatter": "esbenp.prettier-vscode",
+  "editor.formatOnSave": true,
   "editor.formatOnPaste": true,
+  "editor.formatOnType": true,
   "editor.guides.bracketPairs": "active",
-  "files.autoSave": "afterDelay",
-  "git.confirmSync": false,
-  "workbench.startupEditor": "newUntitledFile",
+  "editor.snippetSuggestions": "top",
   "editor.suggestSelection": "first",
   "editor.acceptSuggestionOnCommitCharacter": false,
-  "css.lint.propertyIgnoredDueToDisplay": "ignore",
   "editor.quickSuggestions": {
     "other": true,
     "comments": true,
     "strings": true
   },
-  "files.associations": {
-    "editor.snippetSuggestions": "top"
+  "editor.codeActionsOnSave": {
+    "source.fixAll.eslint": "explicit",
+    "source.fixAll.stylelint": "explicit"
+  },
+  "eslint.validate": ["javascript", "javascriptreact", "typescript", "typescriptreact", "vue"],
+  "stylelint.validate": ["css", "scss", "vue"],
+  "[vue]": {
+    "editor.defaultFormatter": "esbenp.prettier-vscode"
   },
   "[css]": {
     "editor.defaultFormatter": "esbenp.prettier-vscode"
   },
-  "editor.codeActionsOnSave": {
-    "source.fixAll.eslint": true
+  "[scss]": {
+    "editor.defaultFormatter": "esbenp.prettier-vscode"
+  },
+  "[typescript]": {
+    "editor.defaultFormatter": "esbenp.prettier-vscode"
   },
-  "iconify.excludes": ["el"],
-  "cSpell.words": ["iconify", "Qrcode"]
+  "[javascript]": {
+    "editor.defaultFormatter": "esbenp.prettier-vscode"
+  },
+  "css.lint.propertyIgnoredDueToDisplay": "ignore",
+  "files.autoSave": "afterDelay",
+  "git.confirmSync": false,
+  "workbench.startupEditor": "newUntitledFile",
+  "iconify.excludes": ["el"]
 }

+ 3 - 1
backend/GoogleStyle.xml

@@ -148,7 +148,9 @@
     <option name="FOR_BRACE_FORCE" value="3" />
     <option name="WRAP_ON_TYPING" value="0" />
     <indentOptions>
+      <option name="INDENT_SIZE" value="2" />
       <option name="CONTINUATION_INDENT_SIZE" value="4" />
+      <option name="TAB_SIZE" value="2" />
     </indentOptions>
   </codeStyleSettings>
   <codeStyleSettings language="JSON">
@@ -564,4 +566,4 @@
       <option name="TAB_SIZE" value="2" />
     </indentOptions>
   </codeStyleSettings>
-</code_scheme>
+</code_scheme>

+ 1 - 1
frontend/.prettierrc.cjs

@@ -1,7 +1,7 @@
 module.exports = {
+  tabWidth: 2,
   bracketSpacing: true,
   singleQuote: false,
   arrowParens: "avoid",
   trailingComma: "none"
 };
-

+ 0 - 31
frontend/web/.vscode/extensions.json

@@ -1,31 +0,0 @@
-{
-  "recommendations": [
-    "akamud.vscode-theme-onedark",
-    "antfu.iconify",
-    "bradlc.vscode-tailwindcss",
-    "christian-kohler.npm-intellisense",
-    "christian-kohler.path-intellisense",
-    "Codeium.codeium",
-    "csstools.postcss",
-    "DavidAnson.vscode-markdownlint",
-    "dbaeumer.vscode-eslint",
-    "donjayamanne.githistory",
-    "dsznajder.es7-react-js-snippets",
-    "eamodio.gitlens",
-    "ecmel.vscode-html-css",
-    "esbenp.prettier-vscode",
-    "genieai.chatgpt-vscode",
-    "hollowtree.vue-snippets",
-    "lokalise.i18n-ally",
-    "mhutchie.git-graph",
-    "mikestead.dotenv",
-    "pmneo.tsimporter",
-    "streetsidesoftware.code-spell-checker",
-    "stylelint.vscode-stylelint",
-    "syler.sass-indented",
-    "sysoev.language-stylus",
-    "vscode-icons-team.vscode-icons",
-    "Vue.volar",
-    "xabikos.JavaScriptSnippets"
-  ]
-}

+ 0 - 22
frontend/web/.vscode/vue3.0.code-snippets

@@ -1,22 +0,0 @@
-{
-  "Vue3.0快速生成模板": {
-    "scope": "vue",
-    "prefix": "Vue3.0",
-    "body": [
-      "<template>",
-      "\t<div>test</div>",
-      "</template>\n",
-      "<script lang='ts'>",
-      "export default {",
-      "\tsetup() {",
-      "\t\treturn {}",
-      "\t}",
-      "}",
-      "</script>\n",
-      "<style lang='scss' scoped>\n",
-      "</style>",
-      "$2"
-    ],
-    "description": "Vue3.0"
-  }
-}

+ 0 - 17
frontend/web/.vscode/vue3.2.code-snippets

@@ -1,17 +0,0 @@
-{
-  "Vue3.2+快速生成模板": {
-    "scope": "vue",
-    "prefix": "Vue3.2+",
-    "body": [
-      "<script setup lang='ts'>",
-      "</script>\n",
-      "<template>",
-      "\t<div>test</div>",
-      "</template>\n",
-      "<style lang='scss' scoped>\n",
-      "</style>",
-      "$2"
-    ],
-    "description": "Vue3.2+"
-  }
-}

+ 0 - 20
frontend/web/.vscode/vue3.3.code-snippets

@@ -1,20 +0,0 @@
-{
-  "Vue3.3+defineOptions快速生成模板": {
-    "scope": "vue",
-    "prefix": "Vue3.3+",
-    "body": [
-      "<script setup lang='ts'>",
-      "defineOptions({",
-      "\tname: ''",
-      "})",
-      "</script>\n",
-      "<template>",
-      "\t<div>test</div>",
-      "</template>\n",
-      "<style lang='scss' scoped>\n",
-      "</style>",
-      "$2"
-    ],
-    "description": "Vue3.3+defineOptions快速生成模板"
-  }
-}