# Code Style

This project uses **Husky** and **lint-staged** to automatically format and lint code before commits.



## TypeScript [#typescript]

* Use kebab-case for files
* Prefer named exports
* Add JSDoc comments for public APIs

## React [#react]

* Functional components only
* Custom hooks for shared logic
* Use Tailwind for styling

## Formatting [#formatting]

* 2-space indentation
* Double quotes for strings
* Semicolons required

## Pre-commit Setup [#pre-commit-setup]

This project uses **Husky** and **lint-staged** to automatically format and lint code before commits.

### What Happens on Commit [#what-happens-on-commit]

1. **JavaScript/TypeScript files** (`.js`, `.jsx`, `.ts`, `.tsx`):
   * ESLint runs with `--fix`
   * Prettier formats the code

2. **Other files** (`.json`, `.css`, `.md`, `.mdx`):
   * Prettier formats the code

### Manual Commands [#manual-commands]

```bash
bun run format           # Format all files
bun run format:check     # Check formatting
bun run lint             # Lint JavaScript/TypeScript
```

### Skipping Pre-commit Hooks [#skipping-pre-commit-hooks]

```bash
git commit --no-verify -m "your message"
```
