diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index d1a5c0a9..ac4d6c26 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -18,20 +18,21 @@ "source.organizeImports": "explicit" } }, + "oxc.fmt.configPath": ".oxfmtrc.json", "[javascript]": { - "editor.defaultFormatter": "esbenp.prettier-vscode" + "editor.defaultFormatter": "oxc.oxc-vscode" }, "[html]": { - "editor.defaultFormatter": "esbenp.prettier-vscode" + "editor.defaultFormatter": "oxc.oxc-vscode" }, "[typescript]": { - "editor.defaultFormatter": "esbenp.prettier-vscode" + "editor.defaultFormatter": "oxc.oxc-vscode" }, "[javascriptreact]": { - "editor.defaultFormatter": "esbenp.prettier-vscode" + "editor.defaultFormatter": "oxc.oxc-vscode" }, "[typescriptreact]": { - "editor.defaultFormatter": "esbenp.prettier-vscode" + "editor.defaultFormatter": "oxc.oxc-vscode" }, "files.exclude": { "**/__pycache__": true @@ -46,7 +47,7 @@ "ms-python.vscode-pylance", "charliermarsh.ruff", "EditorConfig.EditorConfig", - "esbenp.prettier-vscode", + "oxc.oxc-vscode", "bradlc.vscode-tailwindcss" ] } diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml index 38a5b778..24a71d73 100644 --- a/.github/workflows/release-drafter.yml +++ b/.github/workflows/release-drafter.yml @@ -46,7 +46,7 @@ jobs: - name: Commit and Push run: | - pnpm prettier + pnpm format git config user.name noneflow[bot] git config user.email 129742071+noneflow[bot]@users.noreply.github.com git add . diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 66593f23..12e332b5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -40,7 +40,7 @@ jobs: - name: Archive Files run: | pnpm archive $(uv version --short) - pnpm prettier + pnpm format - name: Push Tag run: | diff --git a/.oxfmtrc.json b/.oxfmtrc.json new file mode 100644 index 00000000..d4c39930 --- /dev/null +++ b/.oxfmtrc.json @@ -0,0 +1,36 @@ +{ + "$schema": "./node_modules/oxfmt/configuration_schema.json", + "arrowParens": "always", + "ignorePatterns": [ + "node_modules", + ".yarn", + ".history", + "coverage", + "**/build/**", + "**/dist/**", + ".docusaurus", + "*.svg", + "pnpm-lock.yaml", + "CITATION.cff", + "/*.md", + "*.yml", + "*.yaml", + ".github/", + "assets/", + "nonebot/", + "packages/nonebot-plugin-docs/", + "scripts/", + "tests/", + "pyproject.toml", + "uv.lock", + "website/versions.json", + "website/versioned_docs/", + "website/versioned_sidebars/*.json", + "website/docs/tutorial/application.mdx" + ], + "insertFinalNewline": true, + "printWidth": 80, + "singleQuote": false, + "sortPackageJson": false, + "trailingComma": "all" +} diff --git a/.prettierignore b/.prettierignore deleted file mode 100644 index 7119ab74..00000000 --- a/.prettierignore +++ /dev/null @@ -1,3 +0,0 @@ -.github/**/*.md -website/docs/tutorial/application.mdx -website/versioned_docs/*/tutorial/application.mdx diff --git a/.prettierrc b/.prettierrc deleted file mode 100644 index eee0e47e..00000000 --- a/.prettierrc +++ /dev/null @@ -1,21 +0,0 @@ -{ - "tabWidth": 2, - "useTabs": false, - "endOfLine": "lf", - "arrowParens": "always", - "singleQuote": false, - "trailingComma": "es5", - "semi": true, - "overrides": [ - { - "files": [ - "**/devcontainer.json", - "**/tsconfig.json", - "**/tsconfig.*.json" - ], - "options": { - "parser": "json" - } - } - ] -} diff --git a/package.json b/package.json index f4ff085f..d1a09ec7 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,8 @@ "start": "pnpm --filter nonebot start", "serve": "pnpm --filter nonebot serve", "clear": "pnpm --filter nonebot clear", - "prettier": "prettier --config ./.prettierrc --write \"./website/\"", + "format": "oxfmt .", + "format:diff": "oxfmt --list-different .", "lint": "pnpm lint:js && pnpm lint:style", "lint:ci": "pnpm lint:js --quiet && pnpm lint:style", "lint:js": "eslint --cache --report-unused-disable-directives \"**/*.{js,jsx,ts,tsx,mjs}\"", @@ -31,9 +32,10 @@ "eslint-plugin-regexp": "^3.1.0", "globals": "^17.6.0", "jiti": "^2.7.0", - "prettier": "^3.0.3", + "oxfmt": "^0.60.0", "pyright": "1.1.393", "stylelint": "^17.12.0", - "stylelint-config-standard": "^40.0.0" + "stylelint-config-standard": "^40.0.0", + "typescript-eslint": "^8.59.3" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 91e58457..8ab8e1f8 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -25,7 +25,7 @@ importers: version: 10.1.8(eslint@9.39.5(jiti@2.7.0)) eslint-plugin-import: specifier: ^2.32.0 - version: 2.32.0(eslint@9.39.5(jiti@2.7.0)) + version: 2.32.0(@typescript-eslint/parser@8.65.0(eslint@9.39.5(jiti@2.7.0))(typescript@5.7.3))(eslint@9.39.5(jiti@2.7.0)) eslint-plugin-jsx-a11y: specifier: ^6.10.2 version: 6.10.2(eslint@9.39.5(jiti@2.7.0)) @@ -44,9 +44,9 @@ importers: jiti: specifier: ^2.7.0 version: 2.7.0 - prettier: - specifier: ^3.0.3 - version: 3.9.6 + oxfmt: + specifier: ^0.60.0 + version: 0.60.0 pyright: specifier: 1.1.393 version: 1.1.393 @@ -56,6 +56,9 @@ importers: stylelint-config-standard: specifier: ^40.0.0 version: 40.0.0(stylelint@17.14.1(typescript@5.7.3)) + typescript-eslint: + specifier: ^8.59.3 + version: 8.65.0(eslint@9.39.5(jiti@2.7.0))(typescript@5.7.3) website: dependencies: @@ -1689,6 +1692,128 @@ packages: '@nullbot/docusaurus-tsconfig@3.8.0': resolution: {integrity: sha512-5wEFeWDXrKbieZVjqUG5HcyJTQspQte2TYOccbhBoPjtiSBs4tNmsnLgyHwOWT0ikV/iN1RgRI1avOWI+N5TYA==} + '@oxfmt/binding-android-arm-eabi@0.60.0': + resolution: {integrity: sha512-1q4q4Jc8FlOMVojEisyFAVyl8h1yawNv6phjgmhGVEDeyeOdsSnSr9x0+D4mOnEKvpO5L4mxKZ/DP9X6U3A/Mw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm] + os: [android] + + '@oxfmt/binding-android-arm64@0.60.0': + resolution: {integrity: sha512-tD41I6nCt9k8SQXft0CSjjU9jg6SwG7uMu7PxodSEHXl+GDW0868oy6tTtoJkyUze8YKFgTpz/k5LuPUnFiGLw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [android] + + '@oxfmt/binding-darwin-arm64@0.60.0': + resolution: {integrity: sha512-TTpzPug96Zxdyb46KvTyIUQDdsqbumXh2TKG9C23PCT0kF7JkW56Z/quPuG9rqOFKQIi1gpRNZ7DX18LwxXPnw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [darwin] + + '@oxfmt/binding-darwin-x64@0.60.0': + resolution: {integrity: sha512-CnOoWgQ7L+JL/YQaRJ+NyATciSfcftncm7y3kqyte1cGtFEGnStaCd1TAyrinkfQ7nRBfHrTs1/vTwUJr3WF2Q==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [darwin] + + '@oxfmt/binding-freebsd-x64@0.60.0': + resolution: {integrity: sha512-ychJo7S3hZxdO6eDZ9zM6F2lM9fpJS3EKS5CAUSWyprdLYxTu4gbaUKV/VBPTcMJwQa2Bpo+643y3OJ537pihA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [freebsd] + + '@oxfmt/binding-linux-arm-gnueabihf@0.60.0': + resolution: {integrity: sha512-36IH5o55T2Fx7E0feDttt+mifxN6yk9pWv4KfhAIsP0dFnUq27331OwbpOsZdoXF9soOLWm7mQUz5+UUmyec4g==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm] + os: [linux] + + '@oxfmt/binding-linux-arm-musleabihf@0.60.0': + resolution: {integrity: sha512-G1Ve7lAa6sFBolVI2LWHfEAqy0YKh4vnioH8uYO9kAEdgM7mR40IksIx9/Zk4+vbYew/sGa4J9Q4tZ3n9gXDHA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm] + os: [linux] + + '@oxfmt/binding-linux-arm64-gnu@0.60.0': + resolution: {integrity: sha512-LTQdRBf6uzj/h7Xk6lKzbGD2hrF/fK4YI9LIN1c0509tPUn8wRa3mCmrFQpEWJPLYGFrLFFMTYW1Ljj6VqW2Hw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [linux] + libc: [glibc] + + '@oxfmt/binding-linux-arm64-musl@0.60.0': + resolution: {integrity: sha512-2JMo3XPxMPx3hiqddSZYyaH+fKJm6cz0u8n1naYjP/CdOQOZW34i8lKBUfmbWiuFvd6KoYXLmhAyBuvojsYS7Q==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [linux] + libc: [musl] + + '@oxfmt/binding-linux-ppc64-gnu@0.60.0': + resolution: {integrity: sha512-L3C+nBD13lr306tr/PjM3RMll+BVqgFrIgUyoeHuai5oueJrRLgO3j+GO5/Cbhtkf5PSlHYTI1JY7iqBd1qa6A==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [ppc64] + os: [linux] + libc: [glibc] + + '@oxfmt/binding-linux-riscv64-gnu@0.60.0': + resolution: {integrity: sha512-M4MsmvqlxFiPtSRGyBYQSZxchEf463AOyd+Dh4/9xDpjWBsRtDUTDMFN5EdHinjVK1/eDJQ8MLpcYjpYayaCnA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [riscv64] + os: [linux] + libc: [glibc] + + '@oxfmt/binding-linux-riscv64-musl@0.60.0': + resolution: {integrity: sha512-OH+9UskYuxRB+GxqdGkVN8f5UpwhqG8YscNo1wl8+KJ62cd7wZdGga6iGLJIf8kibF1WBwvlfDUx3cez/VXwFg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [riscv64] + os: [linux] + libc: [musl] + + '@oxfmt/binding-linux-s390x-gnu@0.60.0': + resolution: {integrity: sha512-y7AAFutt9wFWBFOAn6+BHaV39usZmcr3YYH2385f+NHgPNpIF9HpqKp0jgUxPaUOCyG3oaX5VhJduL1Nw164rw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [s390x] + os: [linux] + libc: [glibc] + + '@oxfmt/binding-linux-x64-gnu@0.60.0': + resolution: {integrity: sha512-yKZ9+CXAI+1RO5nH/4Z/9M6DAsfOzd5bw/gtWk81KB4mpalMaRRSXfouc5/tHxazDmBek55HNPepNYBgaCew0Q==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [linux] + libc: [glibc] + + '@oxfmt/binding-linux-x64-musl@0.60.0': + resolution: {integrity: sha512-bCUGaF6hJOYnQzLJdHLZbvGsOd5oSvGAyJhPAKum2uyLYUuXmP8vqg690DWi2hqcnIoYpqSqCrjzE5aiUAgwQg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [linux] + libc: [musl] + + '@oxfmt/binding-openharmony-arm64@0.60.0': + resolution: {integrity: sha512-GrUeZOvzP30ExxfCuQiyofuUGI+OmvAgFwOO5w5p9mGPlxcyuqI+6Sy9fAKFFfLQrqKYWFgc5sYA2Unj/29nPg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [openharmony] + + '@oxfmt/binding-win32-arm64-msvc@0.60.0': + resolution: {integrity: sha512-WD4Q954kUl2TDJV/6q7UnE2rlKk047kXLJsr4bJ2mXRaAqNXcmV3nwKUsGCc3mz/jYDBnXtJEaBErJEybK8iQQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [win32] + + '@oxfmt/binding-win32-ia32-msvc@0.60.0': + resolution: {integrity: sha512-HqDekjr8JXzVDUP1YthDZ1Y3CBEcuZT4WX3B+1kaxj8CvZA8Y2YhcEsXqoSop3tVsgjACxjnFQFDkBo0r/jq1Q==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [ia32] + os: [win32] + + '@oxfmt/binding-win32-x64-msvc@0.60.0': + resolution: {integrity: sha512-tz78yhmGPKboTMHCHSaUqXK8JrmoSejgDcWeqAtg2s07ZGKQ3rH5Jn8NuXPGNG33CDbY2e9NoQWXIVEmKO21Rw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [win32] + '@peculiar/asn1-cms@2.8.0': resolution: {integrity: sha512-NgekZOrSJFSBFLFoLfwePguAWAx7z1+f2TEsWFUMyiqqfntZ4+S/S5hzqME3q4pCA0iOsFKdwiQ35dwY24eVqA==} @@ -2195,14 +2320,56 @@ packages: '@types/yargs@17.0.35': resolution: {integrity: sha512-qUHkeCyQFxMXg79wQfTtfndEC+N9ZZg76HJftDJp+qH2tV7Gj4OJi7l+PiWwJ+pWtW8GwSmqsDj/oymhrTWXjg==} + '@typescript-eslint/eslint-plugin@8.65.0': + resolution: {integrity: sha512-IEgob78X12rHpUmtcwFsXhZdVGJtwTVP8FiCLZkR6GlYVrl2PcuB+KhCE5BlVC/eQpQnu8WXRtkHZuPar+gCRA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + '@typescript-eslint/parser': ^8.65.0 + eslint: ^8.57.0 || ^9.0.0 || ^10.0.0 + typescript: '>=4.8.4 <6.1.0' + + '@typescript-eslint/parser@8.65.0': + resolution: {integrity: sha512-CZ4nMxWwgu1HEEFNkeaCptra9QCtkmKdgf3sWh1rl1trIhmxLilgTV4cwcbQ4wemnT4sWQN8CaKOmdYx+g2gMA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 || ^10.0.0 + typescript: '>=4.8.4 <6.1.0' + + '@typescript-eslint/project-service@8.65.0': + resolution: {integrity: sha512-SxnPhbTsGahizDgbu7oqFH/xVtzIqMd/s+WtnSxNxJZJpLbdT5IPdzg8EZxO3+PoKahXmwJLeNQOpKJb3/bi7Q==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + typescript: '>=4.8.4 <6.1.0' + '@typescript-eslint/scope-manager@5.62.0': resolution: {integrity: sha512-VXuvVvZeQCQb5Zgf4HAxc04q5j+WrNAtNh9OwCsCgpKqESMTu3tF/jhZ3xG6T4NZwWl65Bg8KuS2uEvhSfLl0w==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + '@typescript-eslint/scope-manager@8.65.0': + resolution: {integrity: sha512-Esbl8OSYiVxBokYgWPf7VVWg/BE798wXhimnn9ML9Pt5qoDf8bfQlgjlKXR/k98+AcNzlLKYrpCcrcuZ9DZLgg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@typescript-eslint/tsconfig-utils@8.65.0': + resolution: {integrity: sha512-j6GzGqCiRdA7Qhur2VVmKZAkBLfnHFQfx4TaJGL9RMveZqCo48jSHHO0DTgizEnGhtWnqmbtCUSrqSkdiY/0Hg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + typescript: '>=4.8.4 <6.1.0' + + '@typescript-eslint/type-utils@8.65.0': + resolution: {integrity: sha512-YjaZ7PRI5qY7ax2L3PbvX0rRyGtipAReCWs0mhhDBHjH/vl0g0BonaGXrKdKpMbIIsMIwDgbk/xzkBTyAltS5g==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 || ^10.0.0 + typescript: '>=4.8.4 <6.1.0' + '@typescript-eslint/types@5.62.0': resolution: {integrity: sha512-87NVngcbVXUahrRTqIK27gD2t5Cu1yuCXxbLcFtCzZGlfyVWWh8mLHkoxzjsB6DDNnvdL+fW8MiwPEJyGJQDgQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + '@typescript-eslint/types@8.65.0': + resolution: {integrity: sha512-JSSwWNy+H0E/01jJEM+hrX6N0OFDzFzeIhHFSAS01tlVaevpG8cFyYRPhS5yjGOvBUx3sqQHVMjCL1CAZZMxBg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/typescript-estree@5.62.0': resolution: {integrity: sha512-CmcQ6uY7b9y694lKdRB8FEel7JbU/40iSAPomu++SjLMntB+2Leay2LO6i8VnJk58MtE9/nQSFIH6jpyRWyYzA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -2212,16 +2379,33 @@ packages: typescript: optional: true + '@typescript-eslint/typescript-estree@8.65.0': + resolution: {integrity: sha512-JboAE2swaYt4tb1fHhHTABE2K+OLy09XfcTbhnk4Pw96f9dd2e9iYsJ28gBggHlo5z5x1rkyWvcPoTuNTd4oGg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + typescript: '>=4.8.4 <6.1.0' + '@typescript-eslint/utils@5.62.0': resolution: {integrity: sha512-n8oxjeb5aIbPFEtmQxQYOLI0i9n5ySBEY/ZEHHZqKQSFnxio1rv6dthascc9dLuwrL0RC5mPCxB7vnAVGAYWAQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 + '@typescript-eslint/utils@8.65.0': + resolution: {integrity: sha512-gXiwIHsYreboxeJucHKPvgwl7dXt50mF8s1/c00cP/WoVTyWKFdtfhRWwZiXYFU5H2O8vVoSLNrexFZjYS/SGA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 || ^10.0.0 + typescript: '>=4.8.4 <6.1.0' + '@typescript-eslint/visitor-keys@5.62.0': resolution: {integrity: sha512-07ny+LHRzQXepkGg6w0mFY41fVUNBrL2Roj/++7V1txKugfjm/Ci/qSND03r2RhlJhJYMcTn9AhhSSqQp0Ysyw==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + '@typescript-eslint/visitor-keys@8.65.0': + resolution: {integrity: sha512-8C71BQkGjiMmXtop7pHVJu1l2NNShFdkCyD6a2ezzs5vU/L3LRtb69EtcteFwz0mYMPzIgOw0n6OV4VBUWZd7A==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@ungap/structured-clone@1.3.3': resolution: {integrity: sha512-60YRaenCQcVjYEKOcG824+DRGGIQ3VKErcBoAEDJZz5bKIs2ZG+X/H9Nk+Q6EVkwJk5QNApxbrc5QtBSwtrXAg==} @@ -2510,6 +2694,10 @@ packages: balanced-match@1.0.2: resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} + balanced-match@4.0.4: + resolution: {integrity: sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==} + engines: {node: 18 || 20 || >=22} + bare-events@2.9.1: resolution: {integrity: sha512-Z0oHEHAFDZkffN8Qc39zNZjQlMDkPJRyyyZieU1VH7u8c5S+qHZ2S8ixdKIAxEjfHO7FJxXmJWgteOghVanIsg==} peerDependencies: @@ -2589,6 +2777,10 @@ packages: brace-expansion@1.1.16: resolution: {integrity: sha512-IDw48K2/2kRkg9LdJxurvq3lV3aBgq0REY89duEqFRthjlPdXHKMj7EnQOXVckxzgisinf3nHfrcE2FufFLXMw==} + brace-expansion@5.0.8: + resolution: {integrity: sha512-JZyDyq3D4AUifKTPOB7DELf6XsB3WdPuNxCtob1vFXPsSXhdAiHBWJ/tJ8HAc9aH84BK+5JFZLNkJKx3G9kzQg==} + engines: {node: 20 || >=22} + braces@3.0.3: resolution: {integrity: sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==} engines: {node: '>=8'} @@ -3401,6 +3593,10 @@ packages: resolution: {integrity: sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + eslint-visitor-keys@5.0.1: + resolution: {integrity: sha512-tD40eHxA35h0PEIZNeIjkHoDR4YjjJp34biM0mDvplBe//mB+IHCqHDGV7pxF+7MklTvighcCPPZC7ynWyjdTA==} + engines: {node: ^20.19.0 || ^22.13.0 || >=24} + eslint@9.39.5: resolution: {integrity: sha512-DgZS62aPLXKlnxILS/AYCoRvHaZeXceIzlXPkkGGzJWSow1aEk0lbTlxUSlyjC8jcaKxAdOnTDz+o1JFSBsyjw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -4764,6 +4960,10 @@ packages: minimalistic-assert@1.0.1: resolution: {integrity: sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==} + minimatch@10.2.5: + resolution: {integrity: sha512-MULkVLfKGYDFYejP07QOurDLLQpcjk7Fw+7jXS2R2czRQzR56yHRveU5NDJEOviH+hETZKSkIk5c+T23GjFUMg==} + engines: {node: 18 || 20 || >=22} + minimatch@3.1.5: resolution: {integrity: sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w==} @@ -4975,6 +5175,19 @@ packages: resolution: {integrity: sha512-qFOyK5PjiWZd+QQIh+1jhdb9LpxTF0qs7Pm8o5QHYZ0M3vKqSqzsZaEB6oWlxZ+q2sJBMI/Ktgd2N5ZwQoRHfg==} engines: {node: '>= 0.4'} + oxfmt@0.60.0: + resolution: {integrity: sha512-fViX6i+gJuZWY+jI/fnR6WRbRj70GZ9RlCd30MygJrHTUNc4DxvKHWw8vBjMjffv3PgU5qWDR0AzmojQByqaZA==} + engines: {node: ^20.19.0 || >=22.12.0} + hasBin: true + peerDependencies: + svelte: ^5.0.0 + vite-plus: '*' + peerDependenciesMeta: + svelte: + optional: true + vite-plus: + optional: true + p-cancelable@3.0.0: resolution: {integrity: sha512-mlVgR3PGuzlo0MmTdk4cXqXWlwQDLnONTAg6sm62XkMJEiRxN3GL3SffkYvqwonbkJBcrI7Uvv5Zh9yjvn2iUw==} engines: {node: '>=12.20'} @@ -5555,11 +5768,6 @@ packages: resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} engines: {node: '>= 0.8.0'} - prettier@3.9.6: - resolution: {integrity: sha512-OpN0zzVdiaiAhxpuuj5efpIS4sY9j7bY6uR5mnj5yPzGkdkjNKSJeUThPb60Jw29QuAZgA4o+/iB49kFiaBX6g==} - engines: {node: '>=14'} - hasBin: true - pretty-error@4.0.0: resolution: {integrity: sha512-AoJ5YMAcXKYxKhuJGdcvse+Voc6v1RgnsR3nWcYU7q4t6z0Q6T86sv5Zq8VIRbOWWFpvdGE83LtdSMNd+6Y0xw==} @@ -6397,6 +6605,10 @@ packages: resolution: {integrity: sha512-Zba82s87IFq9A9XmjiX5uZA/ARWDrB03OHlq+Vw1fSdt0I+4/Kutwy8BP4Y/y/aORMo61FQ0vIb5j44vSo5Pkg==} engines: {node: ^18.0.0 || >=20.0.0} + tinypool@2.1.0: + resolution: {integrity: sha512-Pugqs6M0m7Lv1I7FtxN4aoyToKg1C4tu+/381vH35y8oENM/Ai7f7C4StcoK4/+BSw9ebcS8jRiVrORFKCALLw==} + engines: {node: ^20.0.0 || >=22.0.0} + to-regex-range@5.0.1: resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} engines: {node: '>=8.0'} @@ -6421,6 +6633,12 @@ packages: trough@2.2.0: resolution: {integrity: sha512-tmMpK00BjZiUyVyvrBK7knerNgmgvcV/KLVyuma/SC+TQN167GrMRciANTz09+k3zW8L8t60jWO1GpfkZdjTaw==} + ts-api-utils@2.5.0: + resolution: {integrity: sha512-OJ/ibxhPlqrMM0UiNHJ/0CKQkoKF243/AEmplt3qpRgkW8VG7IfOS41h7V8TjITqdByHzrjcS/2si+y4lIh8NA==} + engines: {node: '>=18.12'} + peerDependencies: + typescript: '>=4.8.4' + ts-interface-checker@0.1.13: resolution: {integrity: sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==} @@ -6481,6 +6699,13 @@ packages: typedarray-to-buffer@3.1.5: resolution: {integrity: sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==} + typescript-eslint@8.65.0: + resolution: {integrity: sha512-/ggrHAwyjENDusvyxbuqxAC2dTnZg/Z8F+fgQtYIz+L6n/9HfSlEZcFGV/NsMNa6CkGk0xUjUAFwC0vHOflvIA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 || ^10.0.0 + typescript: '>=4.8.4 <6.1.0' + typescript@5.7.3: resolution: {integrity: sha512-84MVSjMEHP+FQRPy3pX9sTVV/INIex71s9TL2Gm5FG/WG1SqXeKyZ0k7/blY/4FdOzI12CBy1vGc4og/eus0fw==} engines: {node: '>=14.17'} @@ -9563,6 +9788,63 @@ snapshots: '@nullbot/docusaurus-tsconfig@3.8.0': {} + '@oxfmt/binding-android-arm-eabi@0.60.0': + optional: true + + '@oxfmt/binding-android-arm64@0.60.0': + optional: true + + '@oxfmt/binding-darwin-arm64@0.60.0': + optional: true + + '@oxfmt/binding-darwin-x64@0.60.0': + optional: true + + '@oxfmt/binding-freebsd-x64@0.60.0': + optional: true + + '@oxfmt/binding-linux-arm-gnueabihf@0.60.0': + optional: true + + '@oxfmt/binding-linux-arm-musleabihf@0.60.0': + optional: true + + '@oxfmt/binding-linux-arm64-gnu@0.60.0': + optional: true + + '@oxfmt/binding-linux-arm64-musl@0.60.0': + optional: true + + '@oxfmt/binding-linux-ppc64-gnu@0.60.0': + optional: true + + '@oxfmt/binding-linux-riscv64-gnu@0.60.0': + optional: true + + '@oxfmt/binding-linux-riscv64-musl@0.60.0': + optional: true + + '@oxfmt/binding-linux-s390x-gnu@0.60.0': + optional: true + + '@oxfmt/binding-linux-x64-gnu@0.60.0': + optional: true + + '@oxfmt/binding-linux-x64-musl@0.60.0': + optional: true + + '@oxfmt/binding-openharmony-arm64@0.60.0': + optional: true + + '@oxfmt/binding-win32-arm64-msvc@0.60.0': + optional: true + + '@oxfmt/binding-win32-ia32-msvc@0.60.0': + optional: true + + '@oxfmt/binding-win32-x64-msvc@0.60.0': + optional: true + '@peculiar/asn1-cms@2.8.0': dependencies: '@peculiar/asn1-schema': 2.8.0 @@ -10067,13 +10349,73 @@ snapshots: dependencies: '@types/yargs-parser': 21.0.3 + '@typescript-eslint/eslint-plugin@8.65.0(@typescript-eslint/parser@8.65.0(eslint@9.39.5(jiti@2.7.0))(typescript@5.7.3))(eslint@9.39.5(jiti@2.7.0))(typescript@5.7.3)': + dependencies: + '@eslint-community/regexpp': 4.12.2 + '@typescript-eslint/parser': 8.65.0(eslint@9.39.5(jiti@2.7.0))(typescript@5.7.3) + '@typescript-eslint/scope-manager': 8.65.0 + '@typescript-eslint/type-utils': 8.65.0(eslint@9.39.5(jiti@2.7.0))(typescript@5.7.3) + '@typescript-eslint/utils': 8.65.0(eslint@9.39.5(jiti@2.7.0))(typescript@5.7.3) + '@typescript-eslint/visitor-keys': 8.65.0 + eslint: 9.39.5(jiti@2.7.0) + ignore: 7.0.6 + natural-compare: 1.4.0 + ts-api-utils: 2.5.0(typescript@5.7.3) + typescript: 5.7.3 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/parser@8.65.0(eslint@9.39.5(jiti@2.7.0))(typescript@5.7.3)': + dependencies: + '@typescript-eslint/scope-manager': 8.65.0 + '@typescript-eslint/types': 8.65.0 + '@typescript-eslint/typescript-estree': 8.65.0(typescript@5.7.3) + '@typescript-eslint/visitor-keys': 8.65.0 + debug: 4.4.3 + eslint: 9.39.5(jiti@2.7.0) + typescript: 5.7.3 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/project-service@8.65.0(typescript@5.7.3)': + dependencies: + '@typescript-eslint/tsconfig-utils': 8.65.0(typescript@5.7.3) + '@typescript-eslint/types': 8.65.0 + debug: 4.4.3 + typescript: 5.7.3 + transitivePeerDependencies: + - supports-color + '@typescript-eslint/scope-manager@5.62.0': dependencies: '@typescript-eslint/types': 5.62.0 '@typescript-eslint/visitor-keys': 5.62.0 + '@typescript-eslint/scope-manager@8.65.0': + dependencies: + '@typescript-eslint/types': 8.65.0 + '@typescript-eslint/visitor-keys': 8.65.0 + + '@typescript-eslint/tsconfig-utils@8.65.0(typescript@5.7.3)': + dependencies: + typescript: 5.7.3 + + '@typescript-eslint/type-utils@8.65.0(eslint@9.39.5(jiti@2.7.0))(typescript@5.7.3)': + dependencies: + '@typescript-eslint/types': 8.65.0 + '@typescript-eslint/typescript-estree': 8.65.0(typescript@5.7.3) + '@typescript-eslint/utils': 8.65.0(eslint@9.39.5(jiti@2.7.0))(typescript@5.7.3) + debug: 4.4.3 + eslint: 9.39.5(jiti@2.7.0) + ts-api-utils: 2.5.0(typescript@5.7.3) + typescript: 5.7.3 + transitivePeerDependencies: + - supports-color + '@typescript-eslint/types@5.62.0': {} + '@typescript-eslint/types@8.65.0': {} + '@typescript-eslint/typescript-estree@5.62.0(typescript@5.7.3)': dependencies: '@typescript-eslint/types': 5.62.0 @@ -10088,6 +10430,21 @@ snapshots: transitivePeerDependencies: - supports-color + '@typescript-eslint/typescript-estree@8.65.0(typescript@5.7.3)': + dependencies: + '@typescript-eslint/project-service': 8.65.0(typescript@5.7.3) + '@typescript-eslint/tsconfig-utils': 8.65.0(typescript@5.7.3) + '@typescript-eslint/types': 8.65.0 + '@typescript-eslint/visitor-keys': 8.65.0 + debug: 4.4.3 + minimatch: 10.2.5 + semver: 7.8.5 + tinyglobby: 0.2.17 + ts-api-utils: 2.5.0(typescript@5.7.3) + typescript: 5.7.3 + transitivePeerDependencies: + - supports-color + '@typescript-eslint/utils@5.62.0(eslint@9.39.5(jiti@2.7.0))(typescript@5.7.3)': dependencies: '@eslint-community/eslint-utils': 4.9.1(eslint@9.39.5(jiti@2.7.0)) @@ -10103,11 +10460,27 @@ snapshots: - supports-color - typescript + '@typescript-eslint/utils@8.65.0(eslint@9.39.5(jiti@2.7.0))(typescript@5.7.3)': + dependencies: + '@eslint-community/eslint-utils': 4.9.1(eslint@9.39.5(jiti@2.7.0)) + '@typescript-eslint/scope-manager': 8.65.0 + '@typescript-eslint/types': 8.65.0 + '@typescript-eslint/typescript-estree': 8.65.0(typescript@5.7.3) + eslint: 9.39.5(jiti@2.7.0) + typescript: 5.7.3 + transitivePeerDependencies: + - supports-color + '@typescript-eslint/visitor-keys@5.62.0': dependencies: '@typescript-eslint/types': 5.62.0 eslint-visitor-keys: 3.4.3 + '@typescript-eslint/visitor-keys@8.65.0': + dependencies: + '@typescript-eslint/types': 8.65.0 + eslint-visitor-keys: 5.0.1 + '@ungap/structured-clone@1.3.3': {} '@webassemblyjs/ast@1.14.1': @@ -10453,6 +10826,8 @@ snapshots: balanced-match@1.0.2: {} + balanced-match@4.0.4: {} + bare-events@2.9.1: {} bare-fs@4.7.4: @@ -10549,6 +10924,10 @@ snapshots: balanced-match: 1.0.2 concat-map: 0.0.1 + brace-expansion@5.0.8: + dependencies: + balanced-match: 4.0.4 + braces@3.0.3: dependencies: fill-range: 7.1.1 @@ -11351,16 +11730,17 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-module-utils@2.14.0(eslint-import-resolver-node@0.3.10)(eslint@9.39.5(jiti@2.7.0)): + eslint-module-utils@2.14.0(@typescript-eslint/parser@8.65.0(eslint@9.39.5(jiti@2.7.0))(typescript@5.7.3))(eslint-import-resolver-node@0.3.10)(eslint@9.39.5(jiti@2.7.0)): dependencies: debug: 3.2.7 optionalDependencies: + '@typescript-eslint/parser': 8.65.0(eslint@9.39.5(jiti@2.7.0))(typescript@5.7.3) eslint: 9.39.5(jiti@2.7.0) eslint-import-resolver-node: 0.3.10 transitivePeerDependencies: - supports-color - eslint-plugin-import@2.32.0(eslint@9.39.5(jiti@2.7.0)): + eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.65.0(eslint@9.39.5(jiti@2.7.0))(typescript@5.7.3))(eslint@9.39.5(jiti@2.7.0)): dependencies: '@rtsao/scc': 1.1.0 array-includes: 3.1.9 @@ -11371,7 +11751,7 @@ snapshots: doctrine: 2.1.0 eslint: 9.39.5(jiti@2.7.0) eslint-import-resolver-node: 0.3.10 - eslint-module-utils: 2.14.0(eslint-import-resolver-node@0.3.10)(eslint@9.39.5(jiti@2.7.0)) + eslint-module-utils: 2.14.0(@typescript-eslint/parser@8.65.0(eslint@9.39.5(jiti@2.7.0))(typescript@5.7.3))(eslint-import-resolver-node@0.3.10)(eslint@9.39.5(jiti@2.7.0)) hasown: 2.0.4 is-core-module: 2.16.2 is-glob: 4.0.3 @@ -11382,6 +11762,8 @@ snapshots: semver: 6.3.1 string.prototype.trimend: 1.0.10 tsconfig-paths: 3.15.0 + optionalDependencies: + '@typescript-eslint/parser': 8.65.0(eslint@9.39.5(jiti@2.7.0))(typescript@5.7.3) transitivePeerDependencies: - eslint-import-resolver-typescript - eslint-import-resolver-webpack @@ -11464,6 +11846,8 @@ snapshots: eslint-visitor-keys@4.2.1: {} + eslint-visitor-keys@5.0.1: {} + eslint@9.39.5(jiti@2.7.0): dependencies: '@eslint-community/eslint-utils': 4.9.1(eslint@9.39.5(jiti@2.7.0)) @@ -13191,6 +13575,10 @@ snapshots: minimalistic-assert@1.0.1: {} + minimatch@10.2.5: + dependencies: + brace-expansion: 5.0.8 + minimatch@3.1.5: dependencies: brace-expansion: 1.1.16 @@ -13403,6 +13791,30 @@ snapshots: object-keys: 1.1.1 safe-push-apply: 1.0.0 + oxfmt@0.60.0: + dependencies: + tinypool: 2.1.0 + optionalDependencies: + '@oxfmt/binding-android-arm-eabi': 0.60.0 + '@oxfmt/binding-android-arm64': 0.60.0 + '@oxfmt/binding-darwin-arm64': 0.60.0 + '@oxfmt/binding-darwin-x64': 0.60.0 + '@oxfmt/binding-freebsd-x64': 0.60.0 + '@oxfmt/binding-linux-arm-gnueabihf': 0.60.0 + '@oxfmt/binding-linux-arm-musleabihf': 0.60.0 + '@oxfmt/binding-linux-arm64-gnu': 0.60.0 + '@oxfmt/binding-linux-arm64-musl': 0.60.0 + '@oxfmt/binding-linux-ppc64-gnu': 0.60.0 + '@oxfmt/binding-linux-riscv64-gnu': 0.60.0 + '@oxfmt/binding-linux-riscv64-musl': 0.60.0 + '@oxfmt/binding-linux-s390x-gnu': 0.60.0 + '@oxfmt/binding-linux-x64-gnu': 0.60.0 + '@oxfmt/binding-linux-x64-musl': 0.60.0 + '@oxfmt/binding-openharmony-arm64': 0.60.0 + '@oxfmt/binding-win32-arm64-msvc': 0.60.0 + '@oxfmt/binding-win32-ia32-msvc': 0.60.0 + '@oxfmt/binding-win32-x64-msvc': 0.60.0 + p-cancelable@3.0.0: {} p-finally@1.0.0: {} @@ -14024,8 +14436,6 @@ snapshots: prelude-ls@1.2.1: {} - prettier@3.9.6: {} - pretty-error@4.0.0: dependencies: lodash: 4.18.1 @@ -15129,6 +15539,8 @@ snapshots: tinypool@1.1.1: {} + tinypool@2.1.0: {} + to-regex-range@5.0.1: dependencies: is-number: 7.0.0 @@ -15145,6 +15557,10 @@ snapshots: trough@2.2.0: {} + ts-api-utils@2.5.0(typescript@5.7.3): + dependencies: + typescript: 5.7.3 + ts-interface-checker@0.1.13: {} tsconfig-paths@3.15.0: @@ -15221,6 +15637,17 @@ snapshots: dependencies: is-typedarray: 1.0.0 + typescript-eslint@8.65.0(eslint@9.39.5(jiti@2.7.0))(typescript@5.7.3): + dependencies: + '@typescript-eslint/eslint-plugin': 8.65.0(@typescript-eslint/parser@8.65.0(eslint@9.39.5(jiti@2.7.0))(typescript@5.7.3))(eslint@9.39.5(jiti@2.7.0))(typescript@5.7.3) + '@typescript-eslint/parser': 8.65.0(eslint@9.39.5(jiti@2.7.0))(typescript@5.7.3) + '@typescript-eslint/typescript-estree': 8.65.0(typescript@5.7.3) + '@typescript-eslint/utils': 8.65.0(eslint@9.39.5(jiti@2.7.0))(typescript@5.7.3) + eslint: 9.39.5(jiti@2.7.0) + typescript: 5.7.3 + transitivePeerDependencies: + - supports-color + typescript@5.7.3: {} unbox-primitive@1.1.0: diff --git a/scripts/build-api-docs.sh b/scripts/build-api-docs.sh index 7f16395d..8508f671 100755 --- a/scripts/build-api-docs.sh +++ b/scripts/build-api-docs.sh @@ -10,4 +10,4 @@ nb-autodoc nonebot \ -u nonebot.internal \ -u nonebot.internal.* cp -r ./build/nonebot/* ./website/docs/api/ -pnpm prettier +pnpm format diff --git a/website/package.json b/website/package.json index 034d867e..11e53a67 100644 --- a/website/package.json +++ b/website/package.json @@ -22,8 +22,7 @@ "serve": "docusaurus serve", "write-translations": "docusaurus write-translations", "write-heading-ids": "docusaurus write-heading-ids", - "typecheck": "tsc", - "prettier": "prettier --config ../.prettierrc --write ." + "typecheck": "tsc" }, "dependencies": { "@docusaurus/core": "3.10.2", diff --git a/website/sidebars.ts b/website/sidebars.ts index 3a7f5da1..405a5d64 100644 --- a/website/sidebars.ts +++ b/website/sidebars.ts @@ -148,7 +148,7 @@ const sidebars: SidebarsConfig = { type: "link", label: chunk[0]!.title, href: `/changelog/${index > 0 ? index.toString() : ""}`, - }) + }), ), }, ], diff --git a/website/src/components/Form/Adapter.tsx b/website/src/components/Form/Adapter.tsx index c5b32338..7eedf26e 100644 --- a/website/src/components/Form/Adapter.tsx +++ b/website/src/components/Form/Adapter.tsx @@ -38,7 +38,7 @@ export default function AdapterForm(): React.ReactNode { template: "adapter_publish.yml", title: `Adapter: ${result.name}`, ...result, - })}` + })}`, ); }; diff --git a/website/src/components/Form/Bot.tsx b/website/src/components/Form/Bot.tsx index 6ba4780b..62084220 100644 --- a/website/src/components/Form/Bot.tsx +++ b/website/src/components/Form/Bot.tsx @@ -32,7 +32,7 @@ export default function BotForm(): React.ReactNode { template: "bot_publish.yml", title: `Bot: ${result.name}`, ...result, - })}` + })}`, ); }; diff --git a/website/src/components/Form/Items/Tag/index.tsx b/website/src/components/Form/Items/Tag/index.tsx index 7dfd7c09..a8076ab3 100644 --- a/website/src/components/Form/Items/Tag/index.tsx +++ b/website/src/components/Form/Items/Tag/index.tsx @@ -27,8 +27,8 @@ export default function TagFormItem({ new Set( allowTags .filter((tag) => tag.label.toLocaleLowerCase().includes(label)) - .map((e) => e.label) - ) + .map((e) => e.label), + ), ).slice(0, 5); const validateTag = () => { diff --git a/website/src/components/Form/Plugin.tsx b/website/src/components/Form/Plugin.tsx index c5e531f3..bb1125a5 100644 --- a/website/src/components/Form/Plugin.tsx +++ b/website/src/components/Form/Plugin.tsx @@ -24,7 +24,7 @@ export default function PluginForm(): React.ReactNode { template: "plugin_publish.yml", title: `Plugin: ${result.pypi}`, ...result, - })}` + })}`, ); }; diff --git a/website/src/components/Form/index.tsx b/website/src/components/Form/index.tsx index 8d56e27f..5bfe7ed3 100644 --- a/website/src/components/Form/index.tsx +++ b/website/src/components/Form/index.tsx @@ -49,8 +49,8 @@ export function Form({ data .filter((item) => item.tags.length > 0) .map((ele) => ele.tags) - .flat() - ) + .flat(), + ), ) .catch((e) => { console.error(e); @@ -63,7 +63,7 @@ export function Form({ const handleNextStep = () => { const currentStepNames = formItems[currentStep].items.map( - (item) => item.name + (item) => item.name, ); if (currentStepNames.every((name) => result[name])) { setCurrentStep(currentStep + 1); diff --git a/website/src/components/Messenger/index.tsx b/website/src/components/Messenger/index.tsx index 1a52c1c4..f0297a30 100644 --- a/website/src/components/Messenger/index.tsx +++ b/website/src/components/Messenger/index.tsx @@ -37,7 +37,7 @@ function MessageBox({