feat: add hooks and rules

This commit is contained in:
duthaho
2026-04-19 12:11:56 +07:00
parent 5d87f8c1f3
commit 3103a8da1b
9 changed files with 233 additions and 8 deletions
+17
View File
@@ -0,0 +1,17 @@
---
paths:
- "**/*.tsx"
- "**/*.jsx"
- "src/components/**"
- "src/app/**"
---
# Frontend Rules
- One component per file, named with PascalCase
- Use Server Components by default in Next.js — add `'use client'` only when needed
- Tailwind utility classes for styling — avoid inline styles
- All interactive elements must be keyboard accessible
- Include `aria-label` on icon-only buttons
- Use semantic HTML (`<nav>`, `<main>`, `<section>`) over generic `<div>`
- Images require `alt` text