From 1be577b8842cc8772e50f3db2820c07b27913e97 Mon Sep 17 00:00:00 2001 From: terwer Date: Sat, 13 May 2023 19:02:19 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E6=9B=B4=E6=96=B0=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E6=A0=A1=E9=AA=8C=E8=A7=84=E5=88=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .eslintrc.cjs | 4 - apps/publisher-app/.eslintrc.cjs | 38 + .../publisher-app/.prettierignore | 0 apps/publisher-app/.prettierrc.cjs | 31 + apps/publisher-app/desgin.md | 25 - apps/publisher-app/package.json | 1 + apps/publisher-app/src/App.svelte | 15 +- apps/publisher-app/src/main.ts | 6 +- apps/publisher-app/svelte.config.js | 2 +- apps/publisher-app/vite.config.ts | 4 +- plugins/publisher-main/.prettierignore | 11 + .../publisher-main/.prettierrc.cjs | 0 pnpm-lock.yaml | 1104 ++++++++++++----- 13 files changed, 876 insertions(+), 365 deletions(-) delete mode 100644 .eslintrc.cjs create mode 100644 apps/publisher-app/.eslintrc.cjs rename .prettierignore => apps/publisher-app/.prettierignore (100%) create mode 100644 apps/publisher-app/.prettierrc.cjs delete mode 100644 apps/publisher-app/desgin.md create mode 100644 plugins/publisher-main/.prettierignore rename .prettierrc.cjs => plugins/publisher-main/.prettierrc.cjs (100%) diff --git a/.eslintrc.cjs b/.eslintrc.cjs deleted file mode 100644 index ad99fae8..00000000 --- a/.eslintrc.cjs +++ /dev/null @@ -1,4 +0,0 @@ -module.exports = { - root: true, - extends: ["./node_modules/@terwer/eslint-config-custom/index.cjs"], -} diff --git a/apps/publisher-app/.eslintrc.cjs b/apps/publisher-app/.eslintrc.cjs new file mode 100644 index 00000000..07816050 --- /dev/null +++ b/apps/publisher-app/.eslintrc.cjs @@ -0,0 +1,38 @@ +module.exports = { + extends: [ + "eslint:recommended", + "plugin:@typescript-eslint/recommended", + "plugin:svelte/recommended", + "turbo", + "prettier", + ], + + parser: "@typescript-eslint/parser", + + overrides: [ + { + files: ["*.svelte"], + parser: "svelte-eslint-parser", + // Parse the script in `.svelte` as TypeScript by adding the following configuration. + parserOptions: { + parser: "@typescript-eslint/parser", + }, + }, + ], + + plugins: ["@typescript-eslint", "prettier"], + + rules: { + // Note: you must disable the base rule as it can report incorrect errors + semi: "off", + quotes: "off", + "no-undef": "off", + "@typescript-eslint/no-var-requires": "off", + "@typescript-eslint/no-this-alias": "off", + "@typescript-eslint/no-non-null-assertion": "off", + "@typescript-eslint/no-unused-vars": "off", + "@typescript-eslint/no-explicit-any": "off", + "turbo/no-undeclared-env-vars": "off", + "prettier/prettier": "error", + }, +} diff --git a/.prettierignore b/apps/publisher-app/.prettierignore similarity index 100% rename from .prettierignore rename to apps/publisher-app/.prettierignore diff --git a/apps/publisher-app/.prettierrc.cjs b/apps/publisher-app/.prettierrc.cjs new file mode 100644 index 00000000..e75550a8 --- /dev/null +++ b/apps/publisher-app/.prettierrc.cjs @@ -0,0 +1,31 @@ +/* + * Copyright (c) 2023, Terwer . All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Terwer designates this + * particular file as subject to the "Classpath" exception as provided + * by Terwer in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Terwer, Shenzhen, Guangdong, China, youweics@163.com + * or visit www.terwer.space if you need additional information or have any + * questions. + */ + +module.exports = { + semi: false, + singleQuote: false, + printWidth: 120, + plugins: ["prettier-plugin-svelte"] +} diff --git a/apps/publisher-app/desgin.md b/apps/publisher-app/desgin.md deleted file mode 100644 index 650abeb5..00000000 --- a/apps/publisher-app/desgin.md +++ /dev/null @@ -1,25 +0,0 @@ -# 发布工具设计思路 - -## 菜单 - -``` -发布到... - 博客园 - WordPress - Typecho - ------ - 语雀 - ------ - Hexo ------- -图床管理 ------- -发布设置 -``` - -## 设置页面 - -## 自定义发布页面(可选) - -- 开启了极速发布,可使用最小化配置发布,不显示自定义页面 -- 未开启极速发布,点击发布到对应平台之后显示自定义发布页面 \ No newline at end of file diff --git a/apps/publisher-app/package.json b/apps/publisher-app/package.json index 1b288f4c..d852977c 100644 --- a/apps/publisher-app/package.json +++ b/apps/publisher-app/package.json @@ -12,6 +12,7 @@ }, "devDependencies": { "@sveltejs/vite-plugin-svelte": "^2.0.3", + "@terwer/eslint-config-custom": "latest", "@tsconfig/svelte": "^4.0.1", "svelte": "^3.57.0", "svelte-check": "^2.10.3", diff --git a/apps/publisher-app/src/App.svelte b/apps/publisher-app/src/App.svelte index e8b590f1..112980c3 100644 --- a/apps/publisher-app/src/App.svelte +++ b/apps/publisher-app/src/App.svelte @@ -1,7 +1,9 @@
@@ -20,12 +22,11 @@

- Check out SvelteKit, the official Svelte app framework powered by Vite! + Check out SvelteKit, the + official Svelte app framework powered by Vite!

-

- Click on the Vite and Svelte logos to learn more -

+

Click on the Vite and Svelte logos to learn more