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