Turborepo

Editor integration

To get the best experience with turbo, Turborepo provides a few utilities for integrating with your editor.

JSON Schema for turbo.json

Turborepo uses JSON Schema to give you auto-complete in your turbo.json file. By including the $schema key in your turbo.json, your editor is able to provide full documentation and linting in case you have invalid shapes or missing keys.

Sourcing from the web

A schema.json is accessible at the URL shown below. This has the advantage of not needing to run your package manager's install command to see in-editor validation.

./turbo.json
{
  "$schema": "https://turbo.build/schema.json"
}

There is also a major versioned schema.json available, following the format of https://turbo.build/schema.<version>.json.

./turbo.json
{
  "$schema": "https://turbo.build/schema.v1.json"
}

Sourcing from node_modules

Starting in Turborepo 2.4, schema.json is available in node_modules once you've run your package manager's install command:

turbo.json
{
  "$schema": "./node_modules/turbo/schema.json"
}

node_modules location

We recommend installing turbo at the root of your repository, so the path for the schema should point to node_modules at the root of your repository. In Package Configurations, you may need to use a path like ../../node_modules/turbo/schema.json.

Linting for environment variables

Handling environment variables is an important part of building applications in a Turborepo.

The eslint-config-turbo package extends your ESLint setup to help you make sure you've taken care of all of your environment variables.

Turborepo LSP

Enable even more auto-complete and linting than provided by JSON Schema, with in-editor hinting for invalid globs, references to non-existent tasks or packages, and extra repository visibility tools.

Visit the VSCode Extension Marketplace to install.

Not using Visual Studio Code?

The language server can be used on any editors that support the Language Server Protocol. Log a request in our issue tracker to express your interest.

hours

Total Compute Saved
Get started with
Remote Caching →

On this page