mirror of
https://github.com/DayuanJiang/next-ai-draw-io.git
synced 2026-01-09 09:42:30 +08:00
1.3 KiB
1.3 KiB
Contributing
Setup
git clone https://github.com/YOUR_USERNAME/next-ai-draw-io.git
cd next-ai-draw-io
npm install
cp env.example .env.local
npm run dev
Code Style
We use Biome for linting and formatting:
npm run format # Format code
npm run lint # Check lint errors
npm run check # Run all checks (CI)
Pre-commit hooks via Husky will run Biome automatically on staged files.
For a better experience, install the Biome VS Code extension for real-time linting and format-on-save.
Testing
Run tests before submitting PRs:
npm run test # Unit tests (Vitest)
npm run test:e2e # E2E tests (Playwright)
E2E tests use mocked API responses - no AI provider needed. Tests are in tests/e2e/.
To run a specific test file:
npx playwright test tests/e2e/diagram-generation.spec.ts
To run tests with UI mode:
npx playwright test --ui
Pull Requests
- Create a feature branch
- Make changes and ensure
npm run checkpasses - Run tests with
npm run test:e2e - Submit PR against
mainwith a clear description
Issues
Include steps to reproduce, expected vs actual behavior, and AI provider used.