You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/repo-docs/getting-started/editor-integration.mdx
+24-3Lines changed: 24 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -13,22 +13,43 @@ Turborepo uses [JSON Schema](https://json-schema.org/) to give you auto-complete
13
13
`turbo.json` file. By including the `$schema` key in your `turbo.json`, your editor is able to
14
14
provide full documentation and linting in case you have invalid shapes or missing keys.
15
15
16
+
### Sourcing from the web
17
+
18
+
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.
19
+
16
20
```json title="./turbo.json"
17
21
{
18
22
"$schema": "https://turbo.build/schema.json"
19
23
}
20
24
```
21
25
22
-
### Older versions
23
-
24
-
If you are using Turborepo v1, use `schema.v1.json`.
26
+
There is also a major versioned `schema.json` available, following the format of `https://turbo.build/schema.<version>.json`.
25
27
26
28
```json title="./turbo.json"
27
29
{
28
30
"$schema": "https://turbo.build/schema.v1.json"
29
31
}
30
32
```
31
33
34
+
### Sourcing from `node_modules`
35
+
36
+
Starting in Turborepo 2.4, `schema.json` is available in `node_modules` once you've run your package manager's install command:
37
+
38
+
```json title="turbo.json"
39
+
{
40
+
"$schema": "./node_modules/turbo/schema.json"
41
+
}
42
+
```
43
+
44
+
<Callouttitle="node_modules location">
45
+
We recommend installing `turbo` at the root of your repository, so the path
46
+
for the schema should point to `node_modules` at the root of your repository.
47
+
In [Package Configurations](/repo/docs/reference/package-configurations), you
48
+
may need to use a path like `../../node_modules/turbo/schema.json`.
49
+
</Callout>
50
+
51
+
## Linting for environment variables
52
+
32
53
Handling environment variables is an important part of building applications in a Turborepo.
33
54
34
55
[The `eslint-config-turbo` package](/repo/docs/reference/eslint-config-turbo) extends your ESLint setup to help you make sure you've taken care of all of your environment variables.
0 commit comments