eslint-config-turbo 2.3.2-canary.1 → 2.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +49 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -16,7 +16,39 @@ npm install eslint --save-dev
|
|
|
16
16
|
npm install eslint-config-turbo --save-dev
|
|
17
17
|
```
|
|
18
18
|
|
|
19
|
-
## Usage
|
|
19
|
+
## Usage (Flat Config `eslint.config.js`)
|
|
20
|
+
|
|
21
|
+
```js
|
|
22
|
+
import turboConfig from "eslint-config-turbo/flat";
|
|
23
|
+
|
|
24
|
+
export default [
|
|
25
|
+
...turboConfig,
|
|
26
|
+
// Other configuration
|
|
27
|
+
];
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
You can also configure rules available in the configuration:
|
|
31
|
+
|
|
32
|
+
```js
|
|
33
|
+
import turboConfig from "eslint-config-turbo/flat";
|
|
34
|
+
|
|
35
|
+
export default [
|
|
36
|
+
...turboConfig,
|
|
37
|
+
// Other configuration
|
|
38
|
+
{
|
|
39
|
+
rules: {
|
|
40
|
+
"turbo/no-undeclared-env-vars": [
|
|
41
|
+
"error",
|
|
42
|
+
{
|
|
43
|
+
allowList: ["^ENV_[A-Z]+$"],
|
|
44
|
+
},
|
|
45
|
+
],
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
];
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## Usage (Legacy `eslintrc*`)
|
|
20
52
|
|
|
21
53
|
Add `turbo` to the extends section of your eslint configuration file. You can omit the `eslint-config-` prefix:
|
|
22
54
|
|
|
@@ -25,3 +57,19 @@ Add `turbo` to the extends section of your eslint configuration file. You can om
|
|
|
25
57
|
"extends": ["turbo"]
|
|
26
58
|
}
|
|
27
59
|
```
|
|
60
|
+
|
|
61
|
+
You can also configure rules available in the configuration:
|
|
62
|
+
|
|
63
|
+
```json
|
|
64
|
+
{
|
|
65
|
+
"plugins": ["turbo"],
|
|
66
|
+
"rules": {
|
|
67
|
+
"turbo/no-undeclared-env-vars": [
|
|
68
|
+
"error",
|
|
69
|
+
{
|
|
70
|
+
"allowList": ["^ENV_[A-Z]+$"]
|
|
71
|
+
}
|
|
72
|
+
]
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
```
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-config-turbo",
|
|
3
|
-
"version": "2.3.2
|
|
3
|
+
"version": "2.3.2",
|
|
4
4
|
"description": "ESLint config for Turborepo",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
},
|
|
25
25
|
"author": "Vercel",
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"eslint-plugin-turbo": "2.3.2
|
|
27
|
+
"eslint-plugin-turbo": "2.3.2"
|
|
28
28
|
},
|
|
29
29
|
"peerDependencies": {
|
|
30
30
|
"eslint": ">6.6.0"
|