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: src/docs/guide/usage/linter/generated-config.md
+65-8
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,9 @@ Only the `.json` format is supported. You can use comments in configuration file
12
12
13
13
Example
14
14
15
-
```json [.oxlintrc.json]
15
+
`.oxlintrc.json`
16
+
17
+
```json
16
18
{
17
19
"env": {
18
20
"browser": true
@@ -28,17 +30,52 @@ Example
28
30
}
29
31
```
30
32
31
-
## env
33
+
## categories
32
34
33
35
type: `object`
34
36
37
+
Configure an entire category of rules all at once.
38
+
39
+
Rules enabled or disabled this way will be overwritten by individual rules in the `rules` field.
40
+
41
+
# Example
42
+
43
+
```json
44
+
{
45
+
"categories": {
46
+
"correctness": "warn"
47
+
},
48
+
"rules": {
49
+
"eslint/no-unused-vars": "error"
50
+
}
51
+
}
52
+
```
53
+
54
+
### categories.correctness
55
+
56
+
### categories.nursery
57
+
58
+
### categories.pedantic
59
+
60
+
### categories.perf
61
+
62
+
### categories.restriction
63
+
64
+
### categories.style
65
+
66
+
### categories.suspicious
67
+
68
+
## env
69
+
70
+
type: `Record<string, boolean>`
71
+
35
72
Predefine global variables.
36
73
37
74
Environments specify what global variables are predefined. See [ESLint's list of environments](https://eslint.org/docs/v8.x/use/configure/language-options#specifying-environments) for what environments are available and what each one provides.
38
75
39
76
## globals
40
77
41
-
type: `object`
78
+
type: `Record<string, string>`
42
79
43
80
Add or remove global variables.
44
81
@@ -61,11 +98,9 @@ You may also use `"readable"` or `false` to represent `"readonly"`, and `"writea
0 commit comments