Development Workflow
Code Style and Linting
The project uses ESLint for code linting
Prettier is configured for code formatting
Run linting:
npm run lint # or yarn lintTo automatically fix linting issues:
npm run lint:fix # or yarn lint:fix
Testing
Unit tests:
npm testoryarn testCoverage report:
npm run test:coverageoryarn test:coverageE2E tests:
npm run test:e2eoryarn test:e2eVisual regression tests:
npm run test:visualoryarn test:visualTest file naming convention:
Unit tests:
ComponentName.test.tsxIntegration tests:
ComponentName.integration.test.tsxE2E 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
builddirectory with optimized assets
Available Scripts
npm startoryarn start: Runs the app in development modenpm buildoryarn build: Builds the app for productionnpm testoryarn 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