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
    yarn generate
    
    # Verify Typescript build
    yarn build-ts
    
  2. Linters.

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

    # Run unit tests
    yarn test
    
  4. Integration tests

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

Relevant development docs

Getting applications up and running

How to style UI

Client packages overview