From 0ac390a7df2630334f5f1965564cb6a16d5eb66c Mon Sep 17 00:00:00 2001 From: nekosu Date: Wed, 26 Apr 2023 15:36:49 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BB=85=E5=BC=95=E5=85=A5prettier?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 没有实际进行格式化 --- .prettierignore | 6 ++++++ .prettierrc | 8 ++++++++ .vscode/settings.json | 4 ++++ package.json | 3 ++- 4 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 .prettierignore create mode 100644 .prettierrc diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 00000000..065a8f3e --- /dev/null +++ b/.prettierignore @@ -0,0 +1,6 @@ +packages/common/ArknightsGameData/** +*.md +*.yml +*.yaml +*.json +*.html \ No newline at end of file diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 00000000..109326be --- /dev/null +++ b/.prettierrc @@ -0,0 +1,8 @@ +{ + "trailingComma": "es5", + "semi": false, + "singleQuote": true, + "arrowParens": "avoid", + "vueIndentScriptAndStyle": false, + "printWidth": 80 +} diff --git a/.vscode/settings.json b/.vscode/settings.json index 1037269d..65a17988 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -9,4 +9,8 @@ "packages/renderer/src/i18n" ], "i18n-ally.keystyle": "nested", + "[javascript][typescript][vue][css][less]": { + "editor.formatOnSave": true, + "editor.defaultFormatter": "esbenp.prettier-vscode" + } } diff --git a/package.json b/package.json index f8839e04..744406c8 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,8 @@ "make": "electron-forge make", "start": "electron-forge start", "package": "electron-forge package", - "publish": "electron-forge publish" + "publish": "electron-forge publish", + "format": "npx prettier -w ." }, "engines": { "node": ">=18.12.0"