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
    
    1. Linters. sh yarn all:eslint yarn prettier-check yarn all:stylelint yarn graphql-lint
  2. Unit tests

    # Run unit tests
    yarn test
    
    1. 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