Skip to content

Commit

Permalink
docs: Add information for rules in eslint-config-turbo README.
Browse files Browse the repository at this point in the history
  • Loading branch information
anthonyshew committed Nov 6, 2024
1 parent c6e651a commit fe31bb4
Showing 1 changed file with 31 additions and 5 deletions.
36 changes: 31 additions & 5 deletions packages/eslint-config-turbo/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# `eslint-config-turbo`
# `eslint-plugin-turbo`

Ease configuration for Turborepo

Expand All @@ -10,18 +10,44 @@ Ease configuration for Turborepo
npm install eslint --save-dev
```

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

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

## Usage

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

```json
{
"extends": ["turbo"]
"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]+$"]
}
]
}
}
```

0 comments on commit fe31bb4

Please sign in to comment.