diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile deleted file mode 100644 index 628f3ff8..00000000 --- a/.devcontainer/Dockerfile +++ /dev/null @@ -1,15 +0,0 @@ -# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.238.1/containers/codespaces-linux/.devcontainer/base.Dockerfile - -FROM mcr.microsoft.com/vscode/devcontainers/universal:2-focal - -# ** [Optional] Uncomment this section to install additional packages. ** -# USER root -# -# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ -# && apt-get -y install --no-install-recommends - -USER codespace - -# [Required] Poetry -RUN curl -sSL https://install.python-poetry.org | python - -y -RUN poetry config virtualenvs.in-project true diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index ec63cce1..aca5d823 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,32 +1,13 @@ -// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at: -// https://github.com/microsoft/vscode-dev-containers/tree/v0.238.1/containers/codespaces-linux { - "name": "GitHub Codespaces (Default)", - - "build": { - "dockerfile": "Dockerfile" + "name": "Default Linux Universal", + "image": "mcr.microsoft.com/devcontainers/universal:2-linux", + "features": { + "ghcr.io/devcontainers-contrib/features/poetry:1": {} }, - - // Configure tool-specific properties. + "postCreateCommand": "poetry install && poetry run pre-commit install && yarn install", "customizations": { - // Configure properties specific to VS Code. "vscode": { - // Set *default* container specific settings.json values on container create. "settings": { - "go.toolsManagement.checkForUpdates": "local", - "go.useLanguageServer": true, - "go.gopath": "/go", - "python.defaultInterpreterPath": "/opt/python/latest/bin/python", - "python.linting.enabled": true, - "python.formatting.autopep8Path": "/usr/local/py-utils/bin/autopep8", - "python.formatting.blackPath": "/usr/local/py-utils/bin/black", - "python.formatting.yapfPath": "/usr/local/py-utils/bin/yapf", - "python.linting.banditPath": "/usr/local/py-utils/bin/bandit", - "python.linting.flake8Path": "/usr/local/py-utils/bin/flake8", - "python.linting.mypyPath": "/usr/local/py-utils/bin/mypy", - "python.linting.pycodestylePath": "/usr/local/py-utils/bin/pycodestyle", - "python.linting.pydocstylePath": "/usr/local/py-utils/bin/pydocstyle", - "python.linting.pylintPath": "/usr/local/py-utils/bin/pylint", "python.analysis.diagnosticMode": "workspace", "python.analysis.typeCheckingMode": "basic", "[python]": { @@ -50,7 +31,6 @@ "[typescriptreact]": { "editor.defaultFormatter": "esbenp.prettier-vscode" }, - "lldb.executable": "/usr/bin/lldb", "files.exclude": { "**/__pycache__": true }, @@ -59,10 +39,7 @@ "**/__pycache__": true } }, - - // Add the IDs of extensions you want installed when the container is created. "extensions": [ - "GitHub.vscode-pull-request-github", "ms-python.python", "ms-python.vscode-pylance", "ms-python.isort", @@ -72,27 +49,5 @@ "bradlc.vscode-tailwindcss" ] } - }, - - "remoteUser": "codespace", - - "overrideCommand": false, - - "mounts": [ - "source=codespaces-linux-var-lib-docker,target=/var/lib/docker,type=volume" - ], - - "runArgs": [ - "--cap-add=SYS_PTRACE", - "--security-opt", - "seccomp=unconfined", - "--privileged", - "--init" - ], - - // Use 'forwardPorts' to make a list of ports inside the container available locally. - // "forwardPorts": [], - - // "oryx build" will automatically install your dependencies and attempt to build your project - "postCreateCommand": "poetry install && poetry run pre-commit install && yarn install" + } } diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 4c791cdd..9834f53b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -22,7 +22,7 @@ repos: rev: v3.0.0-alpha.4 hooks: - id: prettier - types_or: [javascript, jsx, ts, tsx, markdown, yaml] + types_or: [javascript, jsx, ts, tsx, markdown, yaml, json] stages: [commit] - repo: https://github.com/nonebot/nonemoji diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a8c79ccb..194faf02 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -33,7 +33,7 @@ pre-commit install ### 使用 GitHub Codespaces(Dev Container) -使用 GitHub Codespaces 选择 `NoneBot2` 项目,然后选择 `.devcontainer/devcontainer.json` 配置即可。 +[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://github.com/codespaces/new?hide_repo_select=true&ref=master&repo=289605524) ### Commit 规范 diff --git a/website/static/adapters.json b/website/static/adapters.json index baa02bdd..720260aa 100644 --- a/website/static/adapters.json +++ b/website/static/adapters.json @@ -114,4 +114,4 @@ ], "is_official": false } -] \ No newline at end of file +] diff --git a/website/static/bots.json b/website/static/bots.json index 9fc23c03..43a4ebb6 100644 --- a/website/static/bots.json +++ b/website/static/bots.json @@ -311,4 +311,4 @@ ], "is_official": false } -] \ No newline at end of file +] diff --git a/website/static/plugins.json b/website/static/plugins.json index e239b73e..d18bbd53 100644 --- a/website/static/plugins.json +++ b/website/static/plugins.json @@ -3348,4 +3348,4 @@ ], "is_official": false } -] \ No newline at end of file +] diff --git a/website/versions.json b/website/versions.json index c68bf8d8..099c4014 100644 --- a/website/versions.json +++ b/website/versions.json @@ -1,3 +1 @@ -[ - "2.0.0-rc.1" -] +["2.0.0-rc.1"]