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 lint

    To automatically fix linting issues:

    npm run lint:fix
    # or
    yarn lint:fix

Testing

  • Unit tests: npm test or yarn test

  • Coverage report: npm run test:coverage or yarn test:coverage

  • E2E tests: npm run test:e2e or yarn test:e2e

  • Visual regression tests: npm run test:visual or yarn 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 or yarn start: Runs the app in development mode

  • npm build or yarn build: Builds the app for production

  • npm test or yarn test: Launches the test runner

  • npm run analyze: Analyzes the bundle size

  • npm run lint: Runs ESLint

  • npm run format: Formats code using Prettier

  • npm run type-check: Runs TypeScript type checking

  • npm run test:coverage: Generates test coverage report

  • npm run test:e2e: Runs end-to-end tests

  • npm run test:visual: Runs visual regression tests

  • npm run storybook: Launches Storybook for component development

  • npm run build-storybook: Builds static Storybook files

  • npm run prepare: Installs git hooks

  • npm run validate: Runs all validation scripts (lint, type-check, test)

Project Structure

Last updated