From 6bbc08fba7a3f92a64d3908756e54167e5fd70ef Mon Sep 17 00:00:00 2001 From: Kuingsmile <96409857+Kuingsmile@users.noreply.github.com> Date: Thu, 11 Jun 2026 02:22:23 -0700 Subject: [PATCH] :package: Chore(custom): update vscode setting --- .prettierrc | 13 ++++- .vscode/extensions.json | 11 +++- .vscode/launch.json | 23 +++++--- .vscode/settings.json | 120 +++++++++++++++++++++++++++++++++------- .vscode/tasks.json | 108 +++++++++++++++++++++++++++++------- CODE_OF_CONDUCT.md | 22 ++++---- LICENSE | 29 ++++------ README.md | 21 +++---- README_cn.md | 21 +++---- 9 files changed, 272 insertions(+), 96 deletions(-) diff --git a/.prettierrc b/.prettierrc index a33a2958..8675f7a7 100644 --- a/.prettierrc +++ b/.prettierrc @@ -16,5 +16,16 @@ "useTabs": false, "endOfLine": "lf", "plugins": ["prettier-plugin-tailwindcss"], - "tailwindStylesheet": "./src/renderer/index.css" + "tailwindStylesheet": "./src/renderer/index.css", + "overrides": [ + { + "files": "*.md", + "options": { + "parser": "markdown", + "proseWrap": "preserve", + "embeddedLanguageFormatting": "auto", + "printWidth": 120 + } + } + ] } diff --git a/.vscode/extensions.json b/.vscode/extensions.json index 7b0fd1d7..e72e3c91 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -1,3 +1,12 @@ { - "recommendations": ["dbaeumer.vscode-eslint", "stylelint.vscode-stylelint"] + "recommendations": [ + "Vue.volar", + "dbaeumer.vscode-eslint", + "stylelint.vscode-stylelint", + "esbenp.prettier-vscode", + "EditorConfig.EditorConfig", + "lokalise.i18n-ally", + "bradlc.vscode-tailwindcss", + "vitest.explorer" + ] } diff --git a/.vscode/launch.json b/.vscode/launch.json index 0b6b9a64..884067b9 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -5,23 +5,31 @@ "name": "Debug Main Process", "type": "node", "request": "launch", - "cwd": "${workspaceRoot}", - "runtimeExecutable": "${workspaceRoot}/node_modules/.bin/electron-vite", + "cwd": "${workspaceFolder}", + "runtimeExecutable": "${workspaceFolder}/node_modules/.bin/electron-vite", "windows": { - "runtimeExecutable": "${workspaceRoot}/node_modules/.bin/electron-vite.cmd" + "runtimeExecutable": "${workspaceFolder}/node_modules/.bin/electron-vite.cmd" }, - "runtimeArgs": ["--sourcemap"], + "runtimeArgs": ["dev", "--sourcemap"], "env": { "REMOTE_DEBUGGING_PORT": "9222" - } + }, + "console": "integratedTerminal", + "outputCapture": "std", + "autoAttachChildProcesses": true, + "skipFiles": ["/**", "${workspaceFolder}/node_modules/**"], + "resolveSourceMapLocations": ["${workspaceFolder}/**", "!**/node_modules/**"] }, { "name": "Debug Renderer Process", - "port": 9222, - "request": "attach", "type": "chrome", + "request": "attach", + "port": 9222, "webRoot": "${workspaceFolder}/src/renderer", + "sourceMaps": true, "timeout": 60000, + "skipFiles": ["${workspaceFolder}/node_modules/**"], + "resolveSourceMapLocations": ["${workspaceFolder}/**", "!**/node_modules/**"], "presentation": { "hidden": true } @@ -31,6 +39,7 @@ { "name": "Debug All", "configurations": ["Debug Main Process", "Debug Renderer Process"], + "stopAll": true, "presentation": { "order": 1 } diff --git a/.vscode/settings.json b/.vscode/settings.json index 358d930d..a96f5ce5 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,9 +1,77 @@ { + "npm.packageManager": "yarn", + "editor.detectIndentation": false, + "editor.insertSpaces": true, + "editor.tabSize": 2, + "editor.rulers": [120], + "editor.formatOnSave": false, + "editor.codeActionsOnSave": { + "source.fixAll.eslint": "explicit", + "source.fixAll.stylelint": "explicit" + }, + "files.encoding": "utf8", + "files.eol": "\n", + "files.insertFinalNewline": true, + "files.trimFinalNewlines": true, + "files.trimTrailingWhitespace": true, + "files.watcherExclude": { + "**/.git/objects/**": true, + "**/.git/subtree-cache/**": true, + "**/dist/**": true, + "**/dist_electron/**": true, + "**/node_modules/**": true, + "**/out/**": true + }, + "search.exclude": { + "**/dist": true, + "**/dist_electron": true, + "**/node_modules": true, + "**/out": true + }, + "explorer.fileNesting.enabled": true, + "explorer.fileNesting.patterns": { + "package.json": "yarn.lock, pnpm-lock.yaml, package-lock.json", + "tsconfig.json": "tsconfig.*.json", + "electron.vite.config.js": "electron-builder.json", + "README.md": "README_cn.md, FAQ.md, FAQ_EN.md, CHANGELOG.md" + }, "eslint.useFlatConfig": true, - "eslint.experimental.useFlatConfig": null, "eslint.run": "onSave", "eslint.codeActionsOnSave.mode": "all", "eslint.format.enable": true, + "eslint.workingDirectories": [ + { + "mode": "auto" + } + ], + "eslint.validate": ["javascript", "javascriptreact", "typescript", "typescriptreact", "vue", "json", "jsonc"], + "stylelint.validate": ["css", "scss", "less", "vue"], + "css.validate": false, + "scss.validate": false, + "less.validate": false, + "prettier.requireConfig": true, + "prettier.useEditorConfig": true, + "js/ts.tsdk.path": "node_modules/typescript/lib", + "js/ts.tsdk.promptToUseWorkspaceVersion": true, + "js/ts.tsserver.maxMemory": 4096, + "js/ts.preferences.quoteStyle": "single", + "js/ts.updateImportsOnFileMove.enabled": "always", + "tailwindCSS.includeLanguages": { + "vue": "html" + }, + "emmet.includeLanguages": { + "vue": "html", + "vue-html": "html" + }, + "i18n-ally.localesPaths": ["src/renderer/i18n/locales", "src/main/i18n/locales"], + "i18n-ally.keystyle": "nested", + "i18n-ally.sortKeys": true, + "i18n-ally.namespace": true, + "i18n-ally.enabledParsers": ["json", "yaml"], + "i18n-ally.sourceLanguage": "en", + "i18n-ally.displayLanguage": "zh-CN", + "i18n-ally.enabledFrameworks": ["vue"], + "i18n-ally.editor.preferEditor": true, "[typescript]": { "editor.defaultFormatter": "dbaeumer.vscode-eslint", "editor.codeActionsOnSave": { @@ -21,7 +89,8 @@ "[vue]": { "editor.defaultFormatter": "dbaeumer.vscode-eslint", "editor.codeActionsOnSave": { - "source.fixAll.eslint": "always" + "source.fixAll.eslint": "always", + "source.fixAll.stylelint": "always" }, "editor.formatOnSave": false }, @@ -39,8 +108,21 @@ }, "editor.formatOnSave": false }, - "editor.codeActionsOnSave": { - "source.fixAll.eslint": "explicit" + "[json]": { + "editor.defaultFormatter": "esbenp.prettier-vscode", + "editor.formatOnSave": true + }, + "[jsonc]": { + "editor.defaultFormatter": "esbenp.prettier-vscode", + "editor.formatOnSave": true + }, + "[markdown]": { + "editor.defaultFormatter": "esbenp.prettier-vscode", + "editor.formatOnSave": true + }, + "[yaml]": { + "editor.defaultFormatter": "esbenp.prettier-vscode", + "editor.formatOnSave": true }, "[css]": { "editor.defaultFormatter": "stylelint.vscode-stylelint", @@ -49,19 +131,19 @@ }, "editor.formatOnSave": false }, - "eslint.validate": ["javascript", "javascriptreact", "vue", "typescript", "typescriptreact", "json", "jsonc"], - "githubPullRequests.ignoredPullRequestBranches": ["dev"], - "i18n-ally.localesPaths": ["src\\renderer\\i18n\\locales", "resources\\i18n", "src\\main\\i18n\\locales"], - "i18n-ally.keystyle": "nested", - "i18n-ally.sortKeys": true, - "i18n-ally.namespace": true, - "i18n-ally.enabledParsers": ["json", "yaml"], - "i18n-ally.sourceLanguage": "en", - "i18n-ally.displayLanguage": "zh-CN", - "i18n-ally.enabledFrameworks": ["vue"], - "i18n-ally.editor.preferEditor": true, - "js/ts.tsdk.path": "node_modules\\typescript\\lib", - "css.validate": false, - "scss.validate": false, - "less.validate": false + "[scss]": { + "editor.defaultFormatter": "stylelint.vscode-stylelint", + "editor.codeActionsOnSave": { + "source.fixAll.stylelint": "always" + }, + "editor.formatOnSave": false + }, + "[less]": { + "editor.defaultFormatter": "stylelint.vscode-stylelint", + "editor.codeActionsOnSave": { + "source.fixAll.stylelint": "always" + }, + "editor.formatOnSave": false + }, + "githubPullRequests.ignoredPullRequestBranches": ["dev"] } diff --git a/.vscode/tasks.json b/.vscode/tasks.json index e110aa3d..affed6cc 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -1,26 +1,96 @@ { - // See https://go.microsoft.com/fwlink/?LinkId=733558 - // for the documentation about the tasks.json format "version": "2.0.0", "tasks": [ { - "label": "electron-debug", - "type": "process", - "command": "./node_modules/.bin/vue-cli-service", - "windows": { - "command": "./node_modules/.bin/vue-cli-service.cmd" - }, - "isBackground": true, - "args": ["electron:serve", "--debug"], - "problemMatcher": { - "owner": "custom", - "pattern": { - "regexp": "" - }, - "background": { - "beginsPattern": "Starting development server\\.\\.\\.", - "endsPattern": "Not launching electron as debug argument was passed\\." - } + "label": "yarn: install", + "type": "shell", + "command": "yarn", + "problemMatcher": [], + "presentation": { + "panel": "dedicated" + } + }, + { + "label": "yarn: dev", + "type": "shell", + "command": "yarn", + "args": ["dev"], + "problemMatcher": [], + "presentation": { + "panel": "dedicated", + "reveal": "always" + } + }, + { + "label": "yarn: build", + "type": "shell", + "command": "yarn", + "args": ["build"], + "group": "build", + "problemMatcher": [], + "presentation": { + "panel": "dedicated" + } + }, + { + "label": "yarn: test", + "type": "shell", + "command": "yarn", + "args": ["test", "--run"], + "group": "test", + "problemMatcher": [], + "presentation": { + "panel": "dedicated" + } + }, + { + "label": "yarn: lint", + "type": "shell", + "command": "yarn", + "args": ["lint"], + "problemMatcher": "$eslint-stylish", + "presentation": { + "panel": "dedicated" + } + }, + { + "label": "yarn: lint:fix", + "type": "shell", + "command": "yarn", + "args": ["lint:fix"], + "problemMatcher": "$eslint-stylish", + "presentation": { + "panel": "dedicated" + } + }, + { + "label": "yarn: lint:style", + "type": "shell", + "command": "yarn", + "args": ["lint:style"], + "problemMatcher": [], + "presentation": { + "panel": "dedicated" + } + }, + { + "label": "yarn: lint:dpdm", + "type": "shell", + "command": "yarn", + "args": ["lint:dpdm"], + "problemMatcher": [], + "presentation": { + "panel": "dedicated" + } + }, + { + "label": "yarn: lint:dpdm:renderer", + "type": "shell", + "command": "yarn", + "args": ["lint:dpdm:renderer"], + "problemMatcher": [], + "presentation": { + "panel": "dedicated" } } ] diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index 1ad82969..5c04ed57 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -17,23 +17,23 @@ diverse, inclusive, and healthy community. Examples of behavior that contributes to a positive environment for our community include: -* Demonstrating empathy and kindness toward other people -* Being respectful of differing opinions, viewpoints, and experiences -* Giving and gracefully accepting constructive feedback -* Accepting responsibility and apologizing to those affected by our mistakes, +- Demonstrating empathy and kindness toward other people +- Being respectful of differing opinions, viewpoints, and experiences +- Giving and gracefully accepting constructive feedback +- Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience -* Focusing on what is best not just for us as individuals, but for the +- Focusing on what is best not just for us as individuals, but for the overall community Examples of unacceptable behavior include: -* The use of sexualized language or imagery, and sexual attention or +- The use of sexualized language or imagery, and sexual attention or advances of any kind -* Trolling, insulting or derogatory comments, and personal or political attacks -* Public or private harassment -* Publishing others' private information, such as a physical or email +- Trolling, insulting or derogatory comments, and personal or political attacks +- Public or private harassment +- Publishing others' private information, such as a physical or email address, without their explicit permission -* Other conduct which could reasonably be considered inappropriate in a +- Other conduct which could reasonably be considered inappropriate in a professional setting ## Enforcement Responsibilities @@ -106,7 +106,7 @@ Violating these terms may lead to a permanent ban. ### 4. Permanent Ban **Community Impact**: Demonstrating a pattern of violation of community -standards, including sustained inappropriate behavior, harassment of an +standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals. **Consequence**: A permanent ban from any sort of public interaction within diff --git a/LICENSE b/LICENSE index 1cee4bcf..038caecc 100644 --- a/LICENSE +++ b/LICENSE @@ -1,23 +1,16 @@ The MIT License (MIT) -Copyright (c) 2017-present, Molunerfinn -Copyright (c) 2019 诗人的咸鱼 -Copyright (c) 2023-present, KuingSmile +Copyright (c) 2017-present, Molunerfinn Copyright (c) 2019 诗人的咸鱼 Copyright (c) 2023-present, KuingSmile -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated +documentation files (the "Software"), to deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the +Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/README.md b/README.md index 900836bb..eda58896 100644 --- a/README.md +++ b/README.md @@ -141,16 +141,16 @@ PicList supports a wide range of storage providers. | Storage Provider | Album Delete | Cloud Management | | :-------------------------- | :----------: | :--------------: | -| **AWS S3** (and compatible) | ✅ | ✅ | -| **Aliyun OSS** | ✅ | ✅ | -| **Tencent COS** | ✅ | ✅ | -| **GitHub / Gitee** | ✅ | ✅ | -| **S.EE / Imgur** | ✅ | ✅ | -| **WebDAV / SFTP** | ✅ | ✅ | -| **Local File System** | ✅ | ✅ | -| **Lsky Pro / Doge Cloud** | ✅ | ✅ | +| **AWS S3** (and compatible) | ✅ | ✅ | +| **Aliyun OSS** | ✅ | ✅ | +| **Tencent COS** | ✅ | ✅ | +| **GitHub / Gitee** | ✅ | ✅ | +| **S.EE / Imgur** | ✅ | ✅ | +| **WebDAV / SFTP** | ✅ | ✅ | +| **Local File System** | ✅ | ✅ | +| **Lsky Pro / Doge Cloud** | ✅ | ✅ | -*Note: The cloud delete feature for custom API image hosts requires implementation via PicList's scripting system based on the specific API.* +_Note: The cloud delete feature for custom API image hosts requires implementation via PicList's scripting system based on the specific API._ ## 🚀 Development @@ -198,5 +198,6 @@ Copyright (c) 2023-present Kuingsmile

Star Me! ⭐️

- [![Star History Chart](https://api.star-history.com/svg?repos=Kuingsmile/PicList&type=Date)](https://star-history.com/#Kuingsmile/PicList&Date) +[![Star History Chart](https://api.star-history.com/svg?repos=Kuingsmile/PicList&type=Date)](https://star-history.com/#Kuingsmile/PicList&Date) +
diff --git a/README_cn.md b/README_cn.md index e65e89ee..96d054f7 100644 --- a/README_cn.md +++ b/README_cn.md @@ -141,16 +141,16 @@ PicList 支持广泛的存储提供商。 | 存储平台 | 相册云删除 | 云存储管理 | | :---------------------- | :--------: | :--------: | -| **AWS S3** (及兼容 API) | ✅ | ✅ | -| **阿里云 OSS** | ✅ | ✅ | -| **腾讯云 COS** | ✅ | ✅ | -| **GitHub / Gitee** | ✅ | ✅ | -| **S.EE / Imgur** | ✅ | ✅ | -| **WebDAV / SFTP** | ✅ | ✅ | -| **本地文件系统** | ✅ | ✅ | -| **兰空图床 / 多吉云** | ✅ | ✅ | +| **AWS S3** (及兼容 API) | ✅ | ✅ | +| **阿里云 OSS** | ✅ | ✅ | +| **腾讯云 COS** | ✅ | ✅ | +| **GitHub / Gitee** | ✅ | ✅ | +| **S.EE / Imgur** | ✅ | ✅ | +| **WebDAV / SFTP** | ✅ | ✅ | +| **本地文件系统** | ✅ | ✅ | +| **兰空图床 / 多吉云** | ✅ | ✅ | -*注意:自定义 API 图床的云删除功能需要通过 PicList 脚本系统根据具体 API 实现。* +_注意:自定义 API 图床的云删除功能需要通过 PicList 脚本系统根据具体 API 实现。_ ## 🚀 开发说明 @@ -198,5 +198,6 @@ Copyright (c) 2023-present Kuingsmile

Star Me! ⭐️

- [![Star History Chart](https://api.star-history.com/svg?repos=Kuingsmile/PicList&type=Date)](https://star-history.com/#Kuingsmile/PicList&Date) +[![Star History Chart](https://api.star-history.com/svg?repos=Kuingsmile/PicList&type=Date)](https://star-history.com/#Kuingsmile/PicList&Date) +