Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
anthonyshew committed Nov 25, 2024
1 parent 7493c5a commit 3d283dd
Showing 1 changed file with 37 additions and 37 deletions.
74 changes: 37 additions & 37 deletions packages/eslint-plugin-turbo/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,45 +16,9 @@ npm install eslint --save-dev
npm install eslint-plugin-turbo --save-dev
```

## Usage (Legacy `eslintrc*`)

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 (Legacy `eslintrc*`)

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

## Usage (Flat Config `eslint.config.js`)

In ESLint v8, both the legacy system and the new flat config system are supported. In ESLint v9, only the new system will be supported. See the [official ESLint docs](https://eslint.org/docs/latest/use/configure/configuration-files).
ESLint v9 uses the Flat Config format seen below:

```js
import turbo from "eslint-plugin-turbo";
Expand Down Expand Up @@ -100,3 +64,39 @@ export default [
},
];
```

## Usage (Legacy `eslintrc*`)

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 (Legacy `eslintrc*`)

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

0 comments on commit 3d283dd

Please sign in to comment.