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: npm/oxlint/configuration_schema.json
+63-1Lines changed: 63 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1194,6 +1194,26 @@
1194
1194
},
1195
1195
"additionalProperties": false
1196
1196
},
1197
+
"Destructuring": {
1198
+
"oneOf": [
1199
+
{
1200
+
"description": "Warn if any of the variables in a destructuring assignment should be `const`.",
1201
+
"type": "string",
1202
+
"enum": [
1203
+
"any"
1204
+
],
1205
+
"markdownDescription": "Warn if any of the variables in a destructuring assignment should be `const`."
1206
+
},
1207
+
{
1208
+
"description": "Only warn if all variables in a destructuring assignment should be `const`. Otherwise, ignore them.",
1209
+
"type": "string",
1210
+
"enum": [
1211
+
"all"
1212
+
],
1213
+
"markdownDescription": "Only warn if all variables in a destructuring assignment should be `const`. Otherwise, ignore them."
1214
+
}
1215
+
]
1216
+
},
1197
1217
"DisplayNameConfig": {
1198
1218
"type": "object",
1199
1219
"properties": {
@@ -4381,7 +4401,24 @@
4381
4401
]
4382
4402
},
4383
4403
"prefer-const": {
4384
-
"$ref": "#/definitions/DummyRule"
4404
+
"anyOf": [
4405
+
{
4406
+
"$ref": "#/definitions/AllowWarnDeny"
4407
+
},
4408
+
{
4409
+
"type": "array",
4410
+
"items": [
4411
+
{
4412
+
"$ref": "#/definitions/AllowWarnDeny"
4413
+
},
4414
+
{
4415
+
"$ref": "#/definitions/PreferConst"
4416
+
}
4417
+
],
4418
+
"maxItems": 2,
4419
+
"minItems": 1
4420
+
}
4421
+
]
4385
4422
},
4386
4423
"prefer-destructuring": {
4387
4424
"$ref": "#/definitions/DummyRule"
@@ -12316,6 +12353,31 @@
12316
12353
},
12317
12354
"additionalProperties": false
12318
12355
},
12356
+
"PreferConst": {
12357
+
"$ref": "#/definitions/PreferConstConfig"
12358
+
},
12359
+
"PreferConstConfig": {
12360
+
"type": "object",
12361
+
"properties": {
12362
+
"destructuring": {
12363
+
"description": "Configures how destructuring assignments are handled.",
12364
+
"default": "any",
12365
+
"allOf": [
12366
+
{
12367
+
"$ref": "#/definitions/Destructuring"
12368
+
}
12369
+
],
12370
+
"markdownDescription": "Configures how destructuring assignments are handled."
12371
+
},
12372
+
"ignoreReadBeforeAssign": {
12373
+
"description": "If `true`, the rule will not report variables that are read before their initial assignment.\nThis is mainly useful for preventing conflicts with the `typescript/no-use-before-define` rule.",
12374
+
"default": false,
12375
+
"type": "boolean",
12376
+
"markdownDescription": "If `true`, the rule will not report variables that are read before their initial assignment.\nThis is mainly useful for preventing conflicts with the `typescript/no-use-before-define` rule."
Copy file name to clipboardExpand all lines: tasks/website_linter/src/snapshots/schema_json.snap
+63-1Lines changed: 63 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1198,6 +1198,26 @@ expression: json
1198
1198
},
1199
1199
"additionalProperties": false
1200
1200
},
1201
+
"Destructuring": {
1202
+
"oneOf": [
1203
+
{
1204
+
"description": "Warn if any of the variables in a destructuring assignment should be `const`.",
1205
+
"type": "string",
1206
+
"enum": [
1207
+
"any"
1208
+
],
1209
+
"markdownDescription": "Warn if any of the variables in a destructuring assignment should be `const`."
1210
+
},
1211
+
{
1212
+
"description": "Only warn if all variables in a destructuring assignment should be `const`. Otherwise, ignore them.",
1213
+
"type": "string",
1214
+
"enum": [
1215
+
"all"
1216
+
],
1217
+
"markdownDescription": "Only warn if all variables in a destructuring assignment should be `const`. Otherwise, ignore them."
1218
+
}
1219
+
]
1220
+
},
1201
1221
"DisplayNameConfig": {
1202
1222
"type": "object",
1203
1223
"properties": {
@@ -4385,7 +4405,24 @@ expression: json
4385
4405
]
4386
4406
},
4387
4407
"prefer-const": {
4388
-
"$ref": "#/definitions/DummyRule"
4408
+
"anyOf": [
4409
+
{
4410
+
"$ref": "#/definitions/AllowWarnDeny"
4411
+
},
4412
+
{
4413
+
"type": "array",
4414
+
"items": [
4415
+
{
4416
+
"$ref": "#/definitions/AllowWarnDeny"
4417
+
},
4418
+
{
4419
+
"$ref": "#/definitions/PreferConst"
4420
+
}
4421
+
],
4422
+
"maxItems": 2,
4423
+
"minItems": 1
4424
+
}
4425
+
]
4389
4426
},
4390
4427
"prefer-destructuring": {
4391
4428
"$ref": "#/definitions/DummyRule"
@@ -12320,6 +12357,31 @@ expression: json
12320
12357
},
12321
12358
"additionalProperties": false
12322
12359
},
12360
+
"PreferConst": {
12361
+
"$ref": "#/definitions/PreferConstConfig"
12362
+
},
12363
+
"PreferConstConfig": {
12364
+
"type": "object",
12365
+
"properties": {
12366
+
"destructuring": {
12367
+
"description": "Configures how destructuring assignments are handled.",
12368
+
"default": "any",
12369
+
"allOf": [
12370
+
{
12371
+
"$ref": "#/definitions/Destructuring"
12372
+
}
12373
+
],
12374
+
"markdownDescription": "Configures how destructuring assignments are handled."
12375
+
},
12376
+
"ignoreReadBeforeAssign": {
12377
+
"description": "If `true`, the rule will not report variables that are read before their initial assignment.\nThis is mainly useful for preventing conflicts with the `typescript/no-use-before-define` rule.",
12378
+
"default": false,
12379
+
"type": "boolean",
12380
+
"markdownDescription": "If `true`, the rule will not report variables that are read before their initial assignment.\nThis is mainly useful for preventing conflicts with the `typescript/no-use-before-define` rule."
0 commit comments