Skip to content

Commit 6ae53bc

Browse files
Boshenclaude
andcommitted
chore: enable vitest and jsx-a11y lint plugins, add utility scripts
- Enable vitest and jsx-a11y plugins in oxlint config for better test and accessibility linting - Add fmt:check script for CI format verification - Add cache:clean script for clearing stale vite task cache - Fix accessibility issues caught by jsx-a11y: replace div[role=button] with semantic button elements in PackageCard and Sidebar overlay Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 20f1a5d commit 6ae53bc

4 files changed

Lines changed: 12 additions & 13 deletions

File tree

.oxlintrc.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33
"unicorn",
44
"typescript",
55
"oxc",
6-
"react"
6+
"react",
7+
"vitest",
8+
"jsx-a11y"
79
],
810
"jsPlugins": [
911
"./plugins/debugger.js"

apps/dashboard/src/components/layout/Sidebar.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,11 @@ export function Sidebar() {
7878

7979
{/* Mobile Overlay */}
8080
{mobileOpen && (
81-
<div
81+
<button
82+
type="button"
8283
className="lg:hidden fixed inset-0 bg-black/40 backdrop-blur-sm z-40"
8384
onClick={() => setMobileOpen(false)}
85+
aria-label="Close menu"
8486
/>
8587
)}
8688

apps/dashboard/src/components/npm/PackageCard.tsx

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -154,17 +154,10 @@ export function PackageCard({ packageName }: PackageCardProps) {
154154
];
155155

156156
return (
157-
<div
158-
className="rounded-lg border border-[var(--color-border)] bg-[var(--color-bg-elevated)] transition-all cursor-pointer group hover:border-[var(--color-border-strong)]"
157+
<button
158+
type="button"
159+
className="rounded-lg border border-[var(--color-border)] bg-[var(--color-bg-elevated)] transition-all cursor-pointer group hover:border-[var(--color-border-strong)] text-left w-full"
159160
onClick={handleClick}
160-
onKeyDown={(e) => {
161-
if (e.key === "Enter" || e.key === " ") {
162-
e.preventDefault();
163-
handleClick();
164-
}
165-
}}
166-
role="button"
167-
tabIndex={0}
168161
>
169162
{/* Header */}
170163
<div className="px-4 py-3 border-b border-[var(--color-border)] flex items-center justify-between">
@@ -195,6 +188,6 @@ export function PackageCard({ packageName }: PackageCardProps) {
195188
</div>
196189
))}
197190
</div>
198-
</div>
191+
</button>
199192
);
200193
}

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
"lint": "vite lint --type-aware --type-check",
1313
"test": "vite test",
1414
"fmt": "vite fmt",
15+
"fmt:check": "vite fmt --check",
16+
"cache:clean": "vite cache clean",
1517
"generate": "node tools/override-rolldown.mjs --stats"
1618
},
1719
"devDependencies": {

0 commit comments

Comments
 (0)