diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 9b48b32..2b1bee5 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -2,7 +2,7 @@ "name": "Default Linux Universal", "image": "mcr.microsoft.com/devcontainers/universal:2-linux", "features": { - "ghcr.io/devcontainers-contrib/features/poetry:1": {} + "ghcr.io/devcontainers-extra/features/poetry:1": {} }, "postCreateCommand": "poetry config virtualenvs.in-project true && poetry install && poetry run pre-commit install", "customizations": { @@ -11,9 +11,9 @@ "python.analysis.diagnosticMode": "workspace", "python.analysis.typeCheckingMode": "basic", "[python]": { - "editor.defaultFormatter": "ms-python.black-formatter", + "editor.defaultFormatter": "ms-python.python", "editor.codeActionsOnSave": { - "source.organizeImports": true + "source.organizeImports": "explicit" } }, "[javascript]": { @@ -45,8 +45,6 @@ "extensions": [ "ms-python.python", "ms-python.vscode-pylance", - "ms-python.isort", - "ms-python.black-formatter", "EditorConfig.EditorConfig", "esbenp.prettier-vscode" ] diff --git a/.gitignore b/.gitignore index d7c26f5..8eec4f4 100644 --- a/.gitignore +++ b/.gitignore @@ -413,6 +413,7 @@ ipython_config.py # in version control. # https://pdm.fming.dev/#use-with-ide .pdm.toml +.pdm-python # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm __pypackages__/ @@ -524,3 +525,7 @@ dist-ssr *.sw? openapi.json + +.claude + +testbot/ \ No newline at end of file diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index be6618f..6c9e0ba 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -7,26 +7,26 @@ ci: autoupdate_commit_msg: ":arrow_up: auto update by pre-commit hooks" repos: - repo: https://github.com/hadialqattan/pycln - rev: v2.1.3 + rev: v2.6.0 hooks: - id: pycln args: [--config, pyproject.toml] stages: [commit] - repo: https://github.com/pycqa/isort - rev: 5.12.0 + rev: 9.0.0a3 hooks: - id: isort stages: [commit] - repo: https://github.com/psf/black - rev: 23.7.0 + rev: 26.5.0 hooks: - id: black stages: [commit] - repo: https://github.com/pre-commit/mirrors-prettier - rev: v3.0.3 + rev: v4.0.0-alpha.8 hooks: - id: prettier stages: [commit] diff --git a/README.md b/README.md index c80d38f..3b77d20 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ _✨ NoneBot2 命令行工具 前端可视化页面(WebUI) 插件 ✨_ pypi - python + python pre-commit diff --git a/frontend/.eslintrc.cjs b/frontend/.eslintrc.cjs index 50ee96f..e7ab8f6 100644 --- a/frontend/.eslintrc.cjs +++ b/frontend/.eslintrc.cjs @@ -1,15 +1,15 @@ /* eslint-env node */ -require('@rushstack/eslint-patch/modern-module-resolution') +require("@rushstack/eslint-patch/modern-module-resolution"); module.exports = { root: true, extends: [ - 'plugin:vue/vue3-essential', - 'eslint:recommended', - '@vue/eslint-config-typescript', - '@vue/eslint-config-prettier/skip-formatting' + "plugin:vue/vue3-essential", + "eslint:recommended", + "@vue/eslint-config-typescript", + "@vue/eslint-config-prettier/skip-formatting", ], parserOptions: { - ecmaVersion: 'latest' - } -} + ecmaVersion: "latest", + }, +}; diff --git a/frontend/openapi-ts.config.ts b/frontend/openapi-ts.config.ts index e4279b9..642c32f 100644 --- a/frontend/openapi-ts.config.ts +++ b/frontend/openapi-ts.config.ts @@ -1,13 +1,13 @@ -import { defineConfig } from '@hey-api/openapi-ts' +import { defineConfig } from "@hey-api/openapi-ts"; export default defineConfig({ - client: '@hey-api/client-fetch', - input: '../openapi.json', + client: "@hey-api/client-fetch", + input: "../openapi.json", output: { - format: 'prettier', - path: './src/client/api' + format: "prettier", + path: "./src/client/api", }, services: { - asClass: true - } -}) + asClass: true, + }, +}); diff --git a/frontend/postcss.config.js b/frontend/postcss.config.js index ffde384..750d0a3 100644 --- a/frontend/postcss.config.js +++ b/frontend/postcss.config.js @@ -1,8 +1,8 @@ export default { plugins: { - 'postcss-import': {}, - 'tailwindcss/nesting': 'postcss-nesting', + "postcss-import": {}, + "tailwindcss/nesting": "postcss-nesting", tailwindcss: {}, - autoprefixer: {} - } -} + autoprefixer: {}, + }, +}; diff --git a/frontend/src/App.vue b/frontend/src/App.vue index 13c4a63..e2af2f2 100644 --- a/frontend/src/App.vue +++ b/frontend/src/App.vue @@ -1,9 +1,9 @@