aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author简律纯 <i@jyunko.cn>2026-01-16 09:35:09 +0800
committerGitHub <noreply@github.com>2026-01-16 09:35:09 +0800
commite21e288275806df7785d869667c90062e1890bf0 (patch)
tree995bd237477b0c406a2a034f6ae37faee43128a0
parent9688bbd2f1ac5acb4b170dcf4d4908a548746cba (diff)
parenta3a1991fbd04dbe283734a8826e60d05ab3fa92a (diff)
downloadDropOut-e21e288275806df7785d869667c90062e1890bf0.tar.gz
DropOut-e21e288275806df7785d869667c90062e1890bf0.zip
Merge pull request #40 from NtskwK/main
-rw-r--r--.github/workflows/check.yml13
-rw-r--r--.github/workflows/lint.yml47
-rw-r--r--ui/package.json7
-rw-r--r--ui/pnpm-lock.yaml179
4 files changed, 243 insertions, 3 deletions
diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml
index 0cbcf35..58fc378 100644
--- a/.github/workflows/check.yml
+++ b/.github/workflows/check.yml
@@ -4,9 +4,11 @@ on:
push:
paths:
- "ui/**"
- - ".github/workflows/ui_check.yml"
+ - ".github/workflows/check.yml"
pull_request:
- branches: ["main", "master", "dev"]
+ paths:
+ - "ui/**"
+ - ".github/workflows/check.yml"
workflow_dispatch:
jobs:
@@ -32,3 +34,10 @@ jobs:
- run: pnpm check
working-directory: ui
+
+ - run: pnpm lint
+ working-directory: ui
+
+ - run: pnpm format --check
+ working-directory: ui
+
diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml
new file mode 100644
index 0000000..5c4a69d
--- /dev/null
+++ b/.github/workflows/lint.yml
@@ -0,0 +1,47 @@
+name: UI Auto Lint
+
+on:
+ push:
+ branches: ["main", "dev"]
+ paths:
+ - "ui/**"
+ workflow_dispatch:
+
+permissions:
+ contents: write
+
+jobs:
+ fix:
+ if: github.event_name != 'pull_request'
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v4
+ with:
+ token: ${{ secrets.GITHUB_TOKEN }}
+
+ - name: Install pnpm
+ uses: pnpm/action-setup@v4
+ with:
+ version: 9
+
+ - name: Install Node.js
+ uses: actions/setup-node@v4
+ with:
+ node-version: 22
+ cache: "pnpm"
+ cache-dependency-path: "ui/pnpm-lock.yaml"
+
+ - run: pnpm install
+ working-directory: ui
+
+ - run: pnpm format
+ working-directory: ui
+
+ - run: pnpm lint:fix
+ working-directory: ui
+
+ - name: Commit changes
+ uses: stefanzweifel/git-auto-commit-action@v5
+ with:
+ commit_message: "style: auto format and lint fix [skip ci]"
+ file_pattern: "ui/**"
diff --git a/ui/package.json b/ui/package.json
index 2db214a..05dd2b2 100644
--- a/ui/package.json
+++ b/ui/package.json
@@ -7,7 +7,10 @@
"dev": "vite",
"build": "vite build",
"preview": "vite preview",
- "check": "svelte-check --tsconfig ./tsconfig.app.json && tsc -p tsconfig.node.json"
+ "check": "svelte-check --tsconfig ./tsconfig.app.json && tsc -p tsconfig.node.json",
+ "lint": "oxlint .",
+ "lint:fix": "oxlint . --fix",
+ "format": "oxfmt . --write"
},
"devDependencies": {
"@sveltejs/vite-plugin-svelte": "^6.2.1",
@@ -15,6 +18,8 @@
"@tsconfig/svelte": "^5.0.6",
"@types/node": "^24.10.1",
"autoprefixer": "^10.4.23",
+ "oxfmt": "^0.24.0",
+ "oxlint": "^1.39.0",
"postcss": "^8.5.6",
"svelte": "^5.46.4",
"svelte-check": "^4.3.4",
diff --git a/ui/pnpm-lock.yaml b/ui/pnpm-lock.yaml
index df9ddc7..390862c 100644
--- a/ui/pnpm-lock.yaml
+++ b/ui/pnpm-lock.yaml
@@ -48,6 +48,12 @@ importers:
autoprefixer:
specifier: ^10.4.23
version: 10.4.23(postcss@8.5.6)
+ oxfmt:
+ specifier: ^0.24.0
+ version: 0.24.0
+ oxlint:
+ specifier: ^1.39.0
+ version: 1.39.0
postcss:
specifier: ^8.5.6
version: 8.5.6
@@ -104,6 +110,86 @@ packages:
'@oxc-project/types@0.97.0':
resolution: {integrity: sha512-lxmZK4xFrdvU0yZiDwgVQTCvh2gHWBJCBk5ALsrtsBWhs0uDIi+FTOnXRQeQfs304imdvTdaakT/lqwQ8hkOXQ==}
+ '@oxfmt/darwin-arm64@0.24.0':
+ resolution: {integrity: sha512-aYXuGf/yq8nsyEcHindGhiz9I+GEqLkVq8CfPbd+6VE259CpPEH+CaGHEO1j6vIOmNr8KHRq+IAjeRO2uJpb8A==}
+ cpu: [arm64]
+ os: [darwin]
+
+ '@oxfmt/darwin-x64@0.24.0':
+ resolution: {integrity: sha512-vs3b8Bs53hbiNvcNeBilzE/+IhDTWKjSBB3v/ztr664nZk65j0xr+5IHMBNz3CFppmX7o/aBta2PxY+t+4KoPg==}
+ cpu: [x64]
+ os: [darwin]
+
+ '@oxfmt/linux-arm64-gnu@0.24.0':
+ resolution: {integrity: sha512-ItPDOPoQ0wLj/s8osc5ch57uUcA1Wk8r0YdO8vLRpXA3UNg7KPOm1vdbkIZRRiSUphZcuX5ioOEetEK8H7RlTw==}
+ cpu: [arm64]
+ os: [linux]
+
+ '@oxfmt/linux-arm64-musl@0.24.0':
+ resolution: {integrity: sha512-JkQO3WnQjQTJONx8nxdgVBfl6BBFfpp9bKhChYhWeakwJdr7QPOAWJ/v3FGZfr0TbqINwnNR74aVZayDDRyXEA==}
+ cpu: [arm64]
+ os: [linux]
+
+ '@oxfmt/linux-x64-gnu@0.24.0':
+ resolution: {integrity: sha512-N/SXlFO+2kak5gMt0oxApi0WXQDhwA0PShR0UbkY0PwtHjfSiDqJSOumyNqgQVoroKr1GNnoRmUqjZIz6DKIcw==}
+ cpu: [x64]
+ os: [linux]
+
+ '@oxfmt/linux-x64-musl@0.24.0':
+ resolution: {integrity: sha512-WM0pek5YDCQf50XQ7GLCE9sMBCMPW/NPAEPH/Hx6Qyir37lEsP4rUmSECo/QFNTU6KBc9NnsviAyJruWPpCMXw==}
+ cpu: [x64]
+ os: [linux]
+
+ '@oxfmt/win32-arm64@0.24.0':
+ resolution: {integrity: sha512-vFCseli1KWtwdHrVlT/jWfZ8jP8oYpnPPEjI23mPLW8K/6GEJmmvy0PZP5NpWUFNTzX0lqie58XnrATJYAe9Xw==}
+ cpu: [arm64]
+ os: [win32]
+
+ '@oxfmt/win32-x64@0.24.0':
+ resolution: {integrity: sha512-0tmlNzcyewAnauNeBCq0xmAkmiKzl+H09p0IdHy+QKrTQdtixtf+AOjDAADbRfihkS+heF15Pjc4IyJMdAAJjw==}
+ cpu: [x64]
+ os: [win32]
+
+ '@oxlint/darwin-arm64@1.39.0':
+ resolution: {integrity: sha512-lT3hNhIa02xCujI6YGgjmYGg3Ht/X9ag5ipUVETaMpx5Rd4BbTNWUPif1WN1YZHxt3KLCIqaAe7zVhatv83HOQ==}
+ cpu: [arm64]
+ os: [darwin]
+
+ '@oxlint/darwin-x64@1.39.0':
+ resolution: {integrity: sha512-UT+rfTWd+Yr7iJeSLd/7nF8X4gTYssKh+n77hxl6Oilp3NnG1CKRHxZDy3o3lIBnwgzJkdyUAiYWO1bTMXQ1lA==}
+ cpu: [x64]
+ os: [darwin]
+
+ '@oxlint/linux-arm64-gnu@1.39.0':
+ resolution: {integrity: sha512-qocBkvS2V6rH0t9AT3DfQunMnj3xkM7srs5/Ycj2j5ZqMoaWd/FxHNVJDFP++35roKSvsRJoS0mtA8/77jqm6Q==}
+ cpu: [arm64]
+ os: [linux]
+
+ '@oxlint/linux-arm64-musl@1.39.0':
+ resolution: {integrity: sha512-arZzAc1PPcz9epvGBBCMHICeyQloKtHX3eoOe62B3Dskn7gf6Q14wnDHr1r9Vp4vtcBATNq6HlKV14smdlC/qA==}
+ cpu: [arm64]
+ os: [linux]
+
+ '@oxlint/linux-x64-gnu@1.39.0':
+ resolution: {integrity: sha512-ZVt5qsECpuNprdWxAPpDBwoixr1VTcZ4qAEQA2l/wmFyVPDYFD3oBY/SWACNnWBddMrswjTg9O8ALxYWoEpmXw==}
+ cpu: [x64]
+ os: [linux]
+
+ '@oxlint/linux-x64-musl@1.39.0':
+ resolution: {integrity: sha512-pB0hlGyKPbxr9NMIV783lD6cWL3MpaqnZRM9MWni4yBdHPTKyFNYdg5hGD0Bwg+UP4S2rOevq/+OO9x9Bi7E6g==}
+ cpu: [x64]
+ os: [linux]
+
+ '@oxlint/win32-arm64@1.39.0':
+ resolution: {integrity: sha512-Gg2SFaJohI9+tIQVKXlPw3FsPQFi/eCSWiCgwPtPn5uzQxHRTeQEZKuluz1fuzR5U70TXubb2liZi4Dgl8LJQA==}
+ cpu: [arm64]
+ os: [win32]
+
+ '@oxlint/win32-x64@1.39.0':
+ resolution: {integrity: sha512-sbi25lfj74hH+6qQtb7s1wEvd1j8OQbTaH8v3xTcDjrwm579Cyh0HBv1YSZ2+gsnVwfVDiCTL1D0JsNqYXszVA==}
+ cpu: [x64]
+ os: [win32]
+
'@rolldown/binding-android-arm64@1.0.0-beta.50':
resolution: {integrity: sha512-XlEkrOIHLyGT3avOgzfTFSjG+f+dZMw+/qd+Y3HLN86wlndrB/gSimrJCk4gOhr1XtRtEKfszpadI3Md4Z4/Ag==}
engines: {node: ^20.19.0 || >=22.12.0}
@@ -535,6 +621,21 @@ packages:
obug@2.1.1:
resolution: {integrity: sha512-uTqF9MuPraAQ+IsnPf366RG4cP9RtUi7MLO1N3KEc+wb0a6yKpeL0lmk2IB1jY5KHPAlTc6T/JRdC/YqxHNwkQ==}
+ oxfmt@0.24.0:
+ resolution: {integrity: sha512-UjeM3Peez8Tl7IJ9s5UwAoZSiDRMww7BEc21gDYxLq3S3/KqJnM3mjNxsoSHgmBvSeX6RBhoVc2MfC/+96RdSw==}
+ engines: {node: ^20.19.0 || >=22.12.0}
+ hasBin: true
+
+ oxlint@1.39.0:
+ resolution: {integrity: sha512-wSiLr0wjG+KTU6c1LpVoQk7JZ7l8HCKlAkVDVTJKWmCGazsNxexxnOXl7dsar92mQcRnzko5g077ggP3RINSjA==}
+ engines: {node: ^20.19.0 || >=22.12.0}
+ hasBin: true
+ peerDependencies:
+ oxlint-tsgolint: '>=0.10.0'
+ peerDependenciesMeta:
+ oxlint-tsgolint:
+ optional: true
+
picocolors@1.1.1:
resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==}
@@ -633,6 +734,10 @@ packages:
resolution: {integrity: sha512-j2Zq4NyQYG5XMST4cbs02Ak8iJUdxRM0XI5QyxXuZOzKOINmWurp3smXu3y5wDcJrptwpSjgXHzIQxR0omXljQ==}
engines: {node: '>=12.0.0'}
+ tinypool@2.0.0:
+ resolution: {integrity: sha512-/RX9RzeH2xU5ADE7n2Ykvmi9ED3FBGPAjw9u3zucrNNaEBIO0HPSYgL0NT7+3p147ojeSdaVu08F6hjpv31HJg==}
+ engines: {node: ^20.0.0 || >=22.0.0}
+
tslib@2.8.1:
resolution: {integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==}
@@ -713,6 +818,54 @@ snapshots:
'@oxc-project/types@0.97.0': {}
+ '@oxfmt/darwin-arm64@0.24.0':
+ optional: true
+
+ '@oxfmt/darwin-x64@0.24.0':
+ optional: true
+
+ '@oxfmt/linux-arm64-gnu@0.24.0':
+ optional: true
+
+ '@oxfmt/linux-arm64-musl@0.24.0':
+ optional: true
+
+ '@oxfmt/linux-x64-gnu@0.24.0':
+ optional: true
+
+ '@oxfmt/linux-x64-musl@0.24.0':
+ optional: true
+
+ '@oxfmt/win32-arm64@0.24.0':
+ optional: true
+
+ '@oxfmt/win32-x64@0.24.0':
+ optional: true
+
+ '@oxlint/darwin-arm64@1.39.0':
+ optional: true
+
+ '@oxlint/darwin-x64@1.39.0':
+ optional: true
+
+ '@oxlint/linux-arm64-gnu@1.39.0':
+ optional: true
+
+ '@oxlint/linux-arm64-musl@1.39.0':
+ optional: true
+
+ '@oxlint/linux-x64-gnu@1.39.0':
+ optional: true
+
+ '@oxlint/linux-x64-musl@1.39.0':
+ optional: true
+
+ '@oxlint/win32-arm64@1.39.0':
+ optional: true
+
+ '@oxlint/win32-x64@1.39.0':
+ optional: true
+
'@rolldown/binding-android-arm64@1.0.0-beta.50':
optional: true
@@ -1028,6 +1181,30 @@ snapshots:
obug@2.1.1: {}
+ oxfmt@0.24.0:
+ dependencies:
+ tinypool: 2.0.0
+ optionalDependencies:
+ '@oxfmt/darwin-arm64': 0.24.0
+ '@oxfmt/darwin-x64': 0.24.0
+ '@oxfmt/linux-arm64-gnu': 0.24.0
+ '@oxfmt/linux-arm64-musl': 0.24.0
+ '@oxfmt/linux-x64-gnu': 0.24.0
+ '@oxfmt/linux-x64-musl': 0.24.0
+ '@oxfmt/win32-arm64': 0.24.0
+ '@oxfmt/win32-x64': 0.24.0
+
+ oxlint@1.39.0:
+ optionalDependencies:
+ '@oxlint/darwin-arm64': 1.39.0
+ '@oxlint/darwin-x64': 1.39.0
+ '@oxlint/linux-arm64-gnu': 1.39.0
+ '@oxlint/linux-arm64-musl': 1.39.0
+ '@oxlint/linux-x64-gnu': 1.39.0
+ '@oxlint/linux-x64-musl': 1.39.0
+ '@oxlint/win32-arm64': 1.39.0
+ '@oxlint/win32-x64': 1.39.0
+
picocolors@1.1.1: {}
picomatch@4.0.3: {}
@@ -1125,6 +1302,8 @@ snapshots:
fdir: 6.5.0(picomatch@4.0.3)
picomatch: 4.0.3
+ tinypool@2.0.0: {}
+
tslib@2.8.1:
optional: true