Development Workflow
Code Style and Linting
The project uses ESLint for code linting
Prettier is configured for code formatting
Run linting:
To automatically fix linting issues:
Testing
Unit tests:
npm test
oryarn test
Coverage report:
npm run test:coverage
oryarn test:coverage
E2E tests:
npm run test:e2e
oryarn test:e2e
Visual regression tests:
npm run test:visual
oryarn test:visual
Test file naming convention:
Unit tests:
ComponentName.test.tsx
Integration tests:
ComponentName.integration.test.tsx
E2E tests:
feature-name.e2e.test.ts
Building for Different Environments
Each environment build will:
Use appropriate environment variables
Apply environment-specific optimizations
Generate source maps (except production)
Create a
build
directory with optimized assets
Available Scripts
npm start
oryarn start
: Runs the app in development modenpm build
oryarn build
: Builds the app for productionnpm test
oryarn test
: Launches the test runnernpm run analyze
: Analyzes the bundle sizenpm run lint
: Runs ESLintnpm run format
: Formats code using Prettiernpm run type-check
: Runs TypeScript type checkingnpm run test:coverage
: Generates test coverage reportnpm run test:e2e
: Runs end-to-end testsnpm run test:visual
: Runs visual regression testsnpm run storybook
: Launches Storybook for component developmentnpm run build-storybook
: Builds static Storybook filesnpm run prepare
: Installs git hooksnpm run validate
: Runs all validation scripts (lint, type-check, test)
Project Structure
Last updated