diff --git a/AGENTS.md b/AGENTS.md index dbbe013..33615e5 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -1,4 +1,33 @@ -# Don'ts +# Agents Guide for stats-hypixel -1. Do not ever commit code without being asked to +## Build Commands + +- `bun run dev` - Start development server with turbopack +- `bun run build` - Build for production +- `bun run typecheck` - Type check with TypeScript +- `bun run lint` - Lint codebase with ESLint +- `bun run lint:fix` - Auto-fix ESLint issues +- `bun run fmt` - Format code with dprint + +## Code Style + +- **Formatting**: Use dprint with 4-space indentation, no semicolons (ASI), double quotes, line width 150 +- **Imports**: Use `@/` for src imports, group by external libs → internal libs → relative imports +- **TypeScript**: Strict mode enabled, use proper type annotations, prefer `type` over `interface` +- **Components**: Use React 19 patterns, prefer function components with props destructuring +- **Styling**: TailwindCSS with `cn()` utility from `@/lib/utils`, use class-variance-authority for variants +- **File naming**: kebab-case for files, PascalCase for components, camelCase for functions +- **Environment**: Use `@t3-oss/env-nextjs` with Zod validation for env vars + +## Key Patterns + +- UI components use Radix UI primitives with custom styling +- Error handling with proper TypeScript error types +- No test framework detected - verify manually or ask user for test commands + +## Don'ts + +- Do not ever commit code without being asked to +- Do not run extra dev servers or builds without asking me, you can run a typecheck eslint and fmt +- In case of any type errors with nextjs run typegen diff --git a/package.json b/package.json index 755ac7b..d56f30d 100644 --- a/package.json +++ b/package.json @@ -7,6 +7,7 @@ "build": "next build --turbopack", "start": "next start", "typegen": "next typegen", + "typecheck": "tsc --noEmit", "lint": "eslint .", "lint:fix": "eslint --fix .", "fmt": "dprint fmt src/**/*.ts src/**/*.tsx"