Frontend contribution guidelines

To work on most frontend issues, it is necessary to run three applications locally:

  1. The web app in the client/web directory.
  2. Storybook (client/storybook)
  3. The browser extension (client/browser)

Project Setup

  1. Clone the repo: git clone https://github.com/sourcegraph/sourcegraph/.
  2. Make sure your node environment is running version 16.x.x.
  3. Go through the local development section here.

CI checks to run locally

  1. Typescript checks.

    # Generate Typescript types
    pnpm generate
    
    # Verify Typescript build
    pnpm build-ts
    
  2. Linters.

    pnpm lint:js:all
    pnpm lint:css:all
    pnpm lint:graphql
    pnpm format:check
    
  3. Unit tests

    # Run unit tests
    pnpm test
    
  4. Integration tests

    # Prepare web application for integration tests
    ENTERPRISE=1 DISABLE_TYPECHECKING=true pnpm run build-web
    # Run integration tests
    pnpm test-integration
    

Relevant development docs

Getting applications up and running

How to style UI

Client packages overview