Răsfoiți Sursa

Merge branch 'dev' of http://git.izouma.com/xiongzhu/raex_front into dev

panhui 3 ani în urmă
părinte
comite
fbce9e6c8e
4 a modificat fișierele cu 35 adăugiri și 16 ștergeri
  1. 2 16
      .prettierrc.js
  2. 1 0
      package.json
  3. 14 0
      volar.config.js
  4. 18 0
      yarn.lock

+ 2 - 16
.prettierrc.js

@@ -3,19 +3,5 @@ module.exports = {
     singleQuote: true,
     tabWidth: 4,
     arrowParens: 'avoid',
-    trailingComma: 'none',
-    overrides: [
-        {
-            files: '*.html',
-            options: {
-                parser: 'html'
-            }
-        },
-        {
-            files: '*.vue',
-            options: {
-                parser: 'vue'
-            }
-        }
-    ]
-};
+    trailingComma: 'none'
+}

+ 1 - 0
package.json

@@ -45,6 +45,7 @@
         "vuex": "^4.0.0-0"
     },
     "devDependencies": {
+        "@volar-plugins/prettier": "^1.1.4",
         "@vue/cli-plugin-babel": "~4.5.0",
         "@vue/cli-plugin-eslint": "~4.5.0",
         "@vue/cli-plugin-router": "~4.5.0",

+ 14 - 0
volar.config.js

@@ -0,0 +1,14 @@
+/** @type {import('@volar-plugins/prettier')} */
+const { volarPrettierPlugin } = require('@volar-plugins/prettier');
+
+module.exports = {
+    plugins: [
+        volarPrettierPlugin({
+            languages: ['html', 'css', 'scss', 'typescript', 'javascript'],
+            html: {
+                breakContentsFromTags: true
+            },
+            useVscodeIndentation: true
+        })
+    ]
+};

+ 18 - 0
yarn.lock

@@ -1318,6 +1318,14 @@
   resolved "https://registry.npmmirror.com/@vant/use/-/use-1.3.5.tgz#fd2817850e76e3098e29d4c8d864e19207c03ab1"
   integrity sha512-S4rfMQT+71quUbSY9sF7vJTEADVWqHxn8zUbpEl4vzI2CCJx67ri/ZHV911LpXIaZVgSSGPLE5xLV8javmbU0Q==
 
+"@volar-plugins/prettier@^1.1.4":
+  version "1.1.4"
+  resolved "https://registry.npmmirror.com/@volar-plugins/prettier/-/prettier-1.1.4.tgz#9b623067640b5b89d91373d6be3b14f57c98630c"
+  integrity sha512-Gz6aD5Sjo8+j7xGDooxkKJGwMqzqF3PhITo+hrUIuVzMjJNyvYreuT2chHxXGe903/wojf4c3T3xVsxmsfaCBg==
+  dependencies:
+    prettier "^2.6.2"
+    vscode-uri "^3.0.3"
+
 "@vue/babel-helper-vue-jsx-merge-props@^1.2.1":
   version "1.2.1"
   resolved "https://registry.npmmirror.com/@vue/babel-helper-vue-jsx-merge-props/-/babel-helper-vue-jsx-merge-props-1.2.1.tgz#31624a7a505fb14da1d58023725a4c5f270e6a81"
@@ -7545,6 +7553,11 @@ prettier-linter-helpers@^1.0.0:
   resolved "https://registry.npmmirror.com/prettier/-/prettier-2.5.1.tgz#fff75fa9d519c54cf0fce328c1017d94546bc56a"
   integrity sha512-vBZcPRUR5MZJwoyi3ZoyQlc1rXeEck8KgeC9AwwOn+exuxLxq5toTRDTSaVrXHxelDMHy9zlicw8u66yxoSUFg==
 
+prettier@^2.6.2:
+  version "2.6.2"
+  resolved "https://registry.npmmirror.com/prettier/-/prettier-2.6.2.tgz#e26d71a18a74c3d0f0597f55f01fb6c06c206032"
+  integrity sha512-PkUpF+qoXTqhOeWL9fu7As8LXsIUZ1WYaJiY/a7McAQzxjk82OF0tibkFXVCDImZtWxbvojFjerkiLb0/q8mew==
+
 pretty-error@^2.0.2:
   version "2.1.2"
   resolved "https://registry.npmmirror.com/pretty-error/-/pretty-error-2.1.2.tgz#be89f82d81b1c86ec8fdfbc385045882727f93b6"
@@ -9435,6 +9448,11 @@ vm2@^3.9.3:
     acorn "^8.7.0"
     acorn-walk "^8.2.0"
 
+vscode-uri@^3.0.3:
+  version "3.0.3"
+  resolved "https://registry.npmmirror.com/vscode-uri/-/vscode-uri-3.0.3.tgz#a95c1ce2e6f41b7549f86279d19f47951e4f4d84"
+  integrity sha512-EcswR2S8bpR7fD0YPeS7r2xXExrScVMxg4MedACaWHEtx9ftCF/qHG1xGkolzTPcEmjTavCQgbVzHUIdTMzFGA==
+
 vue-cli-plugin-style-resources-loader@^0.1.5:
   version "0.1.5"
   resolved "https://registry.npmmirror.com/vue-cli-plugin-style-resources-loader/-/vue-cli-plugin-style-resources-loader-0.1.5.tgz#3e95f4df41f5408e1255664690698c0533648109"