aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/packages/eslint-plugin-turbo/README.md
blob: 83627a1e77d577f77050d87727317138d9d65d84 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# `eslint-plugin-turbo`

Ease configuration for Turborepo

## Installation

1. You'll first need to install [ESLint](https://eslint.org/):

```sh
npm install eslint --save-dev
```

2. Next, install `eslint-plugin-turbo`:

```sh
npm install eslint-plugin-turbo --save-dev
```

## Usage

Add `turbo` to the plugins section of your `.eslintrc` configuration file. You can omit the `eslint-plugin-` prefix:

```json
{
  "plugins": ["turbo"]
}
```

Then configure the rules you want to use under the rules section.

```json
{
  "rules": {
    "turbo/no-undeclared-env-vars": "error"
  }
}
```

### Example

```json
{
  "plugins": ["turbo"],
  "rules": {
    "turbo/no-undeclared-env-vars": [
      "error",
      {
        "allowList": ["^ENV_[A-Z]+$"]
      }
    ]
  }
}
```