From 2e03861c557bbfcd82d63f511e8a04f1cad9c0e1 Mon Sep 17 00:00:00 2001 From: feige996 <1020102647@qq.com> Date: Fri, 13 Jun 2025 16:38:22 +0800 Subject: [PATCH 1/4] =?UTF-8?q?fix(=E9=85=8D=E7=BD=AE):=20=E6=9B=B4?= =?UTF-8?q?=E6=96=B0=E6=96=87=E4=BB=B6=E5=B5=8C=E5=A5=97=E6=A8=A1=E5=BC=8F?= =?UTF-8?q?=EF=BC=8C=E6=B7=BB=E5=8A=A0README.md=E5=92=8Cpages.config.ts?= =?UTF-8?q?=E7=9A=84=E5=85=B3=E8=81=94=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .vscode/settings.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 8b5873b..df60dee 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -56,7 +56,9 @@ "explorer.fileNesting.enabled": true, "explorer.fileNesting.expand": false, "explorer.fileNesting.patterns": { + "README.md": "index.html,favicon.ico,robots.txt,CHANGELOG.md", + "pages.config.ts": "manifest.config.ts,openapi-ts-request.config.ts", "package.json": "pnpm-lock.yaml,pnpm-workspace.yaml,LICENSE,.gitattributes,.gitignore,.gitpod.yml,CNAME,.npmrc,.browserslistrc", - ".eslintrc.cjs": ".eslintignore,.prettierignore,.stylelintignore,.commitlintrc.*,.prettierrc.*,.stylelintrc.*,.eslintrc-auto-import.json,.editorconfig,.commitlint.cjs" + "tsconfig.json": ".commitlintrc.*,.prettier*,.editorconfig,.commitlint.cjs" } } From 02b78976bd5beef6f8455d77a70ae87b6a824f52 Mon Sep 17 00:00:00 2001 From: feige996 <1020102647@qq.com> Date: Fri, 13 Jun 2025 16:42:02 +0800 Subject: [PATCH 2/4] =?UTF-8?q?chore(=E4=BE=9D=E8=B5=96):=20=E6=9B=B4?= =?UTF-8?q?=E6=96=B0oxlint=E7=89=88=E6=9C=AC=E8=87=B31.1.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- pnpm-lock.yaml | 65 ++++++++------------------------------------------ 2 files changed, 11 insertions(+), 56 deletions(-) diff --git a/package.json b/package.json index 34dc301..d2af0d6 100644 --- a/package.json +++ b/package.json @@ -142,7 +142,7 @@ "husky": "^9.1.7", "lint-staged": "^15.2.10", "openapi-ts-request": "^1.1.2", - "oxlint": "^0.1.0", + "oxlint": "^1.1.0", "postcss": "^8.4.49", "postcss-html": "^1.7.0", "postcss-scss": "^4.0.9", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 682e8c2..17c8534 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -175,8 +175,8 @@ importers: specifier: ^1.1.2 version: 1.1.2(@types/node@20.17.9)(@vue/compiler-sfc@3.5.15)(chokidar@3.6.0)(typescript@5.7.2) oxlint: - specifier: ^0.1.0 - version: 0.1.2 + specifier: ^1.1.0 + version: 1.1.0 postcss: specifier: ^8.4.49 version: 8.4.49 @@ -1762,33 +1762,8 @@ packages: resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==} engines: {node: '>= 8'} - '@oxlint/darwin-arm64@0.1.2': - resolution: {integrity: sha512-bOYzbxJEXogwulAhGVNq3vSvp6KEwHaaW1G/3xqFKGxuifaa6YeWfCqqguVLh8N0Ma57LfA93/jzBcnW7XHHTQ==} - cpu: [arm64] - os: [darwin] - - '@oxlint/darwin-x64@0.1.2': - resolution: {integrity: sha512-Z6Djz/3csdxHnHgmV+OEl9he1MX+qstDGWsLNAwKLsvixTXYlDoIvdlazysemmBFgVbpUzKbx6cW4HqS31DdAg==} - cpu: [x64] - os: [darwin] - - '@oxlint/linux-arm64@0.1.2': - resolution: {integrity: sha512-ZjmJVasx0ogX3xG0qhsp9LGliDbS4lzzh9WNZxs76QJOXdulRs5Tk+B+8bYVsZyoo3VXjIofUwRpx11An9hEoA==} - cpu: [arm64] - os: [linux] - - '@oxlint/linux-x64@0.1.2': - resolution: {integrity: sha512-HFCJzqKm5PSjB2uVwy5zVzuVILYwvNgjhQyL3NIJEKF8dpCjn9lxbkJXg1xBJUTCVkuhW/jBdbUipIAFbu7VCg==} - cpu: [x64] - os: [linux] - - '@oxlint/win32-arm64@0.1.2': - resolution: {integrity: sha512-NDjeYzu2RqI2Nn/MhKy9MayPw3I2tuIGWZsn27emv/C6s1KW7P3khRgYJE9hX2Zo6pCVXzDRQdcmtJflH9wDlg==} - cpu: [arm64] - os: [win32] - - '@oxlint/win32-x64@0.1.2': - resolution: {integrity: sha512-zQpQIBAEclJ8tNQKPmGAOKt2ZYNGRWhucfU3mcUr8YPMy1Tf6GPDZUhXNX9icAMRk83n24EtnQb4lR1ipiStmA==} + '@oxlint/win32-x64@1.1.0': + resolution: {integrity: sha512-x6r5yvM3wEty93Bx0NuNK+kutUyS/K55itkUrxdExoK6GcmVDboGGuhju9HyU2cM/IWLEWO8RHcXSyaxr9GR5g==} cpu: [x64] os: [win32] @@ -4376,9 +4351,9 @@ packages: resolution: {integrity: sha512-Sv0OvhPiMutICiwORAUefv02DCPb62IelBmo8ZsSrRHyI3FStqIWZvjqDkvtjU+lcujo7UNir+dCwKSqlEQ/5w==} engines: {node: '>=10', yarn: ^1.22.4} - oxlint@0.1.2: - resolution: {integrity: sha512-hy/pmCx0zgZr1sLZjQeKYoBc0JbFbvd6r9I8CdNjd3bOH100A3JVSjOkClMq6sMG5+mN7TztZzHnpmVKY+jdjw==} - engines: {node: '>=14.*'} + oxlint@1.1.0: + resolution: {integrity: sha512-OVNpaoaQCUHHhCv5sYMPJ7Ts5k7ziw0QteH1gBSwF3elf/8GAew2Uh/0S7HsU1iGtjhlFy80+A8nwIb3Tq6m1w==} + engines: {node: '>=8.*'} hasBin: true p-cancelable@2.1.1: @@ -7996,22 +7971,7 @@ snapshots: '@nodelib/fs.scandir': 2.1.5 fastq: 1.17.1 - '@oxlint/darwin-arm64@0.1.2': - optional: true - - '@oxlint/darwin-x64@0.1.2': - optional: true - - '@oxlint/linux-arm64@0.1.2': - optional: true - - '@oxlint/linux-x64@0.1.2': - optional: true - - '@oxlint/win32-arm64@0.1.2': - optional: true - - '@oxlint/win32-x64@0.1.2': + '@oxlint/win32-x64@1.1.0': optional: true '@polka/url@1.0.0-next.29': {} @@ -11086,14 +11046,9 @@ snapshots: dependencies: lcid: 3.1.1 - oxlint@0.1.2: + oxlint@1.1.0: optionalDependencies: - '@oxlint/darwin-arm64': 0.1.2 - '@oxlint/darwin-x64': 0.1.2 - '@oxlint/linux-arm64': 0.1.2 - '@oxlint/linux-x64': 0.1.2 - '@oxlint/win32-arm64': 0.1.2 - '@oxlint/win32-x64': 0.1.2 + '@oxlint/win32-x64': 1.1.0 p-cancelable@2.1.1: {} From 3893aff68f8d84e6fe2d529de8d5631fb8779941 Mon Sep 17 00:00:00 2001 From: feige996 <1020102647@qq.com> Date: Fri, 13 Jun 2025 17:00:31 +0800 Subject: [PATCH 3/4] =?UTF-8?q?chore:=20=E6=9B=B4=E6=96=B0oxlint=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E5=8F=8A=E4=BE=9D=E8=B5=96=E7=89=88=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 添加oxlint到VSCode设置 - 在useUpload.ts中移除未使用的import和注释掉accept参数 - 在utils/index.ts中简化getAllPages函数 - 更新package.json中的oxlint版本和lint配置 - 更新pnpm-lock.yaml中的oxlint相关依赖 --- .vscode/settings.json | 1 + package.json | 9 +++-- pnpm-lock.yaml | 85 +++++++++++++++++++++++++++++++++++++----- src/hooks/useUpload.ts | 4 +- src/utils/index.ts | 15 ++++---- 5 files changed, 91 insertions(+), 23 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index df60dee..0c91bbd 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -41,6 +41,7 @@ "commitlint", "dcloudio", "iconfont", + "oxlint", "qrcode", "refresherrefresh", "scrolltolower", diff --git a/package.json b/package.json index d2af0d6..648b24b 100644 --- a/package.json +++ b/package.json @@ -70,13 +70,14 @@ "build:quickapp-webview-union": "uni build -p quickapp-webview-union", "type-check": "vue-tsc --noEmit", "openapi-ts-request": "openapi-ts", - "prepare": "git init && husky" + "prepare": "git init && husky", + "lint:oxlint": "oxlint src/**/*.{ts,js,vue}" }, "lint-staged": { - "**/*.{vue,html,cjs,json,md,scss,css,txt}": [ + "**/*.{html,cjs,json,md,scss,css,txt}": [ "prettier --write --cache" ], - "**/*.{js,ts}": [ + "**/*.{js,ts,vue}": [ "oxlint --fix", "prettier --write --cache" ], @@ -142,7 +143,7 @@ "husky": "^9.1.7", "lint-staged": "^15.2.10", "openapi-ts-request": "^1.1.2", - "oxlint": "^1.1.0", + "oxlint": "1.0.0", "postcss": "^8.4.49", "postcss-html": "^1.7.0", "postcss-scss": "^4.0.9", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 17c8534..8dff150 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -175,8 +175,8 @@ importers: specifier: ^1.1.2 version: 1.1.2(@types/node@20.17.9)(@vue/compiler-sfc@3.5.15)(chokidar@3.6.0)(typescript@5.7.2) oxlint: - specifier: ^1.1.0 - version: 1.1.0 + specifier: 1.0.0 + version: 1.0.0 postcss: specifier: ^8.4.49 version: 8.4.49 @@ -1762,8 +1762,47 @@ packages: resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==} engines: {node: '>= 8'} - '@oxlint/win32-x64@1.1.0': - resolution: {integrity: sha512-x6r5yvM3wEty93Bx0NuNK+kutUyS/K55itkUrxdExoK6GcmVDboGGuhju9HyU2cM/IWLEWO8RHcXSyaxr9GR5g==} + '@oxlint/darwin-arm64@1.0.0': + resolution: {integrity: sha512-Ei8wLh65Th/si5EY6mfQIXVpdXbJWOoh56FaxxPgVxTeJaj3NHUIlxICHkvTZ5dz8bnOFcbS/+9MaW8Qkzfm9g==} + cpu: [arm64] + os: [darwin] + + '@oxlint/darwin-x64@1.0.0': + resolution: {integrity: sha512-dbdtQ+rJTUb4jFKTzV+j08yYcR8lZssLF10n7MggK/jI7pBtoQN04cupzYdkxOWSy6uDXjDmWYFDIqlTqV7zOg==} + cpu: [x64] + os: [darwin] + + '@oxlint/linux-arm64-gnu@1.0.0': + resolution: {integrity: sha512-71wy9zMxsAeRhCFQjUkDLT8N5tm10L5FxNxsUcEsezgM187X9tPGP1gwlFpYig7F+bg2X1dijFuTA/FSe0YpKg==} + cpu: [arm64] + os: [linux] + libc: [glibc] + + '@oxlint/linux-arm64-musl@1.0.0': + resolution: {integrity: sha512-UbD4+2k7aGZOFtKK/yeESX7Fv0w9gQbcjrjr1HGY7QOYg7XlFlqzycZdPS6XbAuKA5oOXFpafaYOD4AyX3p2AA==} + cpu: [arm64] + os: [linux] + libc: [musl] + + '@oxlint/linux-x64-gnu@1.0.0': + resolution: {integrity: sha512-0NXWqsm65I3VaLgADW4y9r7Pwurqgs2fr1lqoTyTIlidD18LQ3UMAWp8NzBPMCYzw8c/rTgOzsFf0gLtxzMtwg==} + cpu: [x64] + os: [linux] + libc: [glibc] + + '@oxlint/linux-x64-musl@1.0.0': + resolution: {integrity: sha512-AY1NLnVQI+tBeuaB8KCriWfiD6O1zZFAQHphRDcZiqSz4mauNq9FFuffW0N9RSR9hYttGr0UVdQ6eK72RhzOYg==} + cpu: [x64] + os: [linux] + libc: [musl] + + '@oxlint/win32-arm64@1.0.0': + resolution: {integrity: sha512-X9y2KAdoqT/jy/sITGDZNMJHJAmhDhofItBnCf2DWS1HPakdtCAKGX9KMx6SivTbtPn1+JpZgfHn4Y7rNMvujQ==} + cpu: [arm64] + os: [win32] + + '@oxlint/win32-x64@1.0.0': + resolution: {integrity: sha512-x2eQwZCfRUi6GG0lhRuC54O6TK2uW7UbIvERh83vPi0ftd+rtGUuJauNdyC+pPx+iwFToFVet43/5MBMu4bMWg==} cpu: [x64] os: [win32] @@ -4351,8 +4390,8 @@ packages: resolution: {integrity: sha512-Sv0OvhPiMutICiwORAUefv02DCPb62IelBmo8ZsSrRHyI3FStqIWZvjqDkvtjU+lcujo7UNir+dCwKSqlEQ/5w==} engines: {node: '>=10', yarn: ^1.22.4} - oxlint@1.1.0: - resolution: {integrity: sha512-OVNpaoaQCUHHhCv5sYMPJ7Ts5k7ziw0QteH1gBSwF3elf/8GAew2Uh/0S7HsU1iGtjhlFy80+A8nwIb3Tq6m1w==} + oxlint@1.0.0: + resolution: {integrity: sha512-yyeryHnd21wPBLBEF4Uf8hvzJlftrIGHxyUaqFaP2JYiZ9cbiColygZhrezvv/Z/aThCmYu3j6iJMxlVPxNt6g==} engines: {node: '>=8.*'} hasBin: true @@ -7971,7 +8010,28 @@ snapshots: '@nodelib/fs.scandir': 2.1.5 fastq: 1.17.1 - '@oxlint/win32-x64@1.1.0': + '@oxlint/darwin-arm64@1.0.0': + optional: true + + '@oxlint/darwin-x64@1.0.0': + optional: true + + '@oxlint/linux-arm64-gnu@1.0.0': + optional: true + + '@oxlint/linux-arm64-musl@1.0.0': + optional: true + + '@oxlint/linux-x64-gnu@1.0.0': + optional: true + + '@oxlint/linux-x64-musl@1.0.0': + optional: true + + '@oxlint/win32-arm64@1.0.0': + optional: true + + '@oxlint/win32-x64@1.0.0': optional: true '@polka/url@1.0.0-next.29': {} @@ -11046,9 +11106,16 @@ snapshots: dependencies: lcid: 3.1.1 - oxlint@1.1.0: + oxlint@1.0.0: optionalDependencies: - '@oxlint/win32-x64': 1.1.0 + '@oxlint/darwin-arm64': 1.0.0 + '@oxlint/darwin-x64': 1.0.0 + '@oxlint/linux-arm64-gnu': 1.0.0 + '@oxlint/linux-arm64-musl': 1.0.0 + '@oxlint/linux-x64-gnu': 1.0.0 + '@oxlint/linux-x64-musl': 1.0.0 + '@oxlint/win32-arm64': 1.0.0 + '@oxlint/win32-x64': 1.0.0 p-cancelable@2.1.1: {} diff --git a/src/hooks/useUpload.ts b/src/hooks/useUpload.ts index d5e39cb..d0936de 100644 --- a/src/hooks/useUpload.ts +++ b/src/hooks/useUpload.ts @@ -1,4 +1,4 @@ -import { ref, Ref } from 'vue' +import { ref } from 'vue' import { getEnvBaseUploadUrl } from '@/utils' const VITE_UPLOAD_BASEURL = `${getEnvBaseUploadUrl()}` @@ -20,7 +20,7 @@ export default function useUpload(options: TOptions = {} const { formData = {}, maxSize = 5 * 1024 * 1024, - accept = ['*'], + // accept = ['*'], fileType = 'image', success, error: onError, diff --git a/src/utils/index.ts b/src/utils/index.ts index 3d6380d..d021ce3 100644 --- a/src/utils/index.ts +++ b/src/utils/index.ts @@ -101,14 +101,13 @@ export const getUrlObj = (url: string) => { */ export const getAllPages = (key = 'needLogin') => { // 这里处理主包 - const mainPages = [ - ...pages - .filter((page) => !key || page[key]) - .map((page) => ({ - ...page, - path: `/${page.path}`, - })), - ] + const mainPages = pages + .filter((page) => !key || page[key]) + .map((page) => ({ + ...page, + path: `/${page.path}`, + })) + // 这里处理分包 const subPages: any[] = [] subPackages.forEach((subPageObj) => { From 2fb1e6d71c9de60c24af61d17c8a4484557f0f89 Mon Sep 17 00:00:00 2001 From: feige996 <1020102647@qq.com> Date: Fri, 13 Jun 2025 17:00:59 +0800 Subject: [PATCH 4/4] =?UTF-8?q?chore:=20=E6=9B=B4=E6=96=B0=E7=89=88?= =?UTF-8?q?=E6=9C=AC=E5=8F=B7=E8=87=B32.12.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 648b24b..624c305 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "unibest", "type": "commonjs", - "version": "2.11.1", + "version": "2.12.0", "description": "unibest - 最好的 uniapp 开发模板", "update-time": "2025-05-28", "author": {