@depup/oxlint 1.74.0-depup.0 → 1.76.0-depup.0
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 +2 -2
- package/changes.json +1 -1
- package/configuration_schema.json +430 -17
- package/dist/bindings.js +26 -26
- package/dist/index.d.ts +184 -11
- package/dist/lint.js +317 -254
- package/dist/plugins-dev.d.ts +2 -2
- package/package.json +23 -23
package/README.md
CHANGED
|
@@ -13,8 +13,8 @@ npm install @depup/oxlint
|
|
|
13
13
|
|
|
14
14
|
| Field | Value |
|
|
15
15
|
|-------|-------|
|
|
16
|
-
| Original | [oxlint](https://www.npmjs.com/package/oxlint) @ 1.
|
|
17
|
-
| Processed | 2026-07-
|
|
16
|
+
| Original | [oxlint](https://www.npmjs.com/package/oxlint) @ 1.76.0 |
|
|
17
|
+
| Processed | 2026-07-27 |
|
|
18
18
|
| Smoke test | passed |
|
|
19
19
|
| Deps updated | 0 |
|
|
20
20
|
|
package/changes.json
CHANGED
|
@@ -30,12 +30,12 @@
|
|
|
30
30
|
"markdownDescription": "Environments enable and disable collections of global variables."
|
|
31
31
|
},
|
|
32
32
|
"extends": {
|
|
33
|
-
"description": "
|
|
33
|
+
"description": "Configurations that this configuration file extends (inherits from).\n\nIn `.oxlintrc.json`, `extends` has type `string[]`. Each string is a path to a configuration\nfile, resolved relative to the location of the configuration file that contains the\n`extends` property.\n\nIn `oxlint.config.ts`, `extends` has type `OxlintConfig[]`. Import each configuration and\npass the configuration object directly:\n\n```ts\nimport { defineConfig } from \"oxlint\";\nimport baseConfig from \"./base-config.ts\";\n\nexport default defineConfig({ extends: [baseConfig] });\n```\n\nConfigurations are merged from the first to the last, with the last configuration\noverriding the previous ones.",
|
|
34
34
|
"type": "array",
|
|
35
35
|
"items": {
|
|
36
36
|
"type": "string"
|
|
37
37
|
},
|
|
38
|
-
"markdownDescription": "
|
|
38
|
+
"markdownDescription": "Configurations that this configuration file extends (inherits from).\n\nIn `.oxlintrc.json`, `extends` has type `string[]`. Each string is a path to a configuration\nfile, resolved relative to the location of the configuration file that contains the\n`extends` property.\n\nIn `oxlint.config.ts`, `extends` has type `OxlintConfig[]`. Import each configuration and\npass the configuration object directly:\n\n```ts\nimport { defineConfig } from \"oxlint\";\nimport baseConfig from \"./base-config.ts\";\n\nexport default defineConfig({ extends: [baseConfig] });\n```\n\nConfigurations are merged from the first to the last, with the last configuration\noverriding the previous ones."
|
|
39
39
|
},
|
|
40
40
|
"globals": {
|
|
41
41
|
"description": "Enabled or disabled specific global variables.",
|
|
@@ -2535,6 +2535,29 @@
|
|
|
2535
2535
|
"guard-for-in": {
|
|
2536
2536
|
"$ref": "#/definitions/RuleNoConfig"
|
|
2537
2537
|
},
|
|
2538
|
+
"id-denylist": {
|
|
2539
|
+
"anyOf": [
|
|
2540
|
+
{
|
|
2541
|
+
"$ref": "#/definitions/RuleNoConfig"
|
|
2542
|
+
},
|
|
2543
|
+
{
|
|
2544
|
+
"type": "array",
|
|
2545
|
+
"items": [
|
|
2546
|
+
{
|
|
2547
|
+
"$ref": "#/definitions/AllowWarnDeny"
|
|
2548
|
+
},
|
|
2549
|
+
{
|
|
2550
|
+
"type": "string"
|
|
2551
|
+
}
|
|
2552
|
+
],
|
|
2553
|
+
"additionalItems": {
|
|
2554
|
+
"type": "string"
|
|
2555
|
+
},
|
|
2556
|
+
"minItems": 2,
|
|
2557
|
+
"uniqueItems": true
|
|
2558
|
+
}
|
|
2559
|
+
]
|
|
2560
|
+
},
|
|
2538
2561
|
"id-length": {
|
|
2539
2562
|
"anyOf": [
|
|
2540
2563
|
{
|
|
@@ -3350,7 +3373,24 @@
|
|
|
3350
3373
|
"$ref": "#/definitions/RuleNoConfig"
|
|
3351
3374
|
},
|
|
3352
3375
|
"jest/prefer-lowercase-title": {
|
|
3353
|
-
"
|
|
3376
|
+
"anyOf": [
|
|
3377
|
+
{
|
|
3378
|
+
"$ref": "#/definitions/RuleNoConfig"
|
|
3379
|
+
},
|
|
3380
|
+
{
|
|
3381
|
+
"type": "array",
|
|
3382
|
+
"items": [
|
|
3383
|
+
{
|
|
3384
|
+
"$ref": "#/definitions/AllowWarnDeny"
|
|
3385
|
+
},
|
|
3386
|
+
{
|
|
3387
|
+
"$ref": "#/definitions/PreferLowercaseTitleConfig"
|
|
3388
|
+
}
|
|
3389
|
+
],
|
|
3390
|
+
"maxItems": 2,
|
|
3391
|
+
"minItems": 2
|
|
3392
|
+
}
|
|
3393
|
+
]
|
|
3354
3394
|
},
|
|
3355
3395
|
"jest/prefer-mock-promise-shorthand": {
|
|
3356
3396
|
"$ref": "#/definitions/RuleNoConfig"
|
|
@@ -5115,7 +5155,25 @@
|
|
|
5115
5155
|
]
|
|
5116
5156
|
},
|
|
5117
5157
|
"no-restricted-globals": {
|
|
5118
|
-
"
|
|
5158
|
+
"anyOf": [
|
|
5159
|
+
{
|
|
5160
|
+
"$ref": "#/definitions/RuleNoConfig"
|
|
5161
|
+
},
|
|
5162
|
+
{
|
|
5163
|
+
"items": [
|
|
5164
|
+
{
|
|
5165
|
+
"$ref": "#/definitions/AllowWarnDeny"
|
|
5166
|
+
},
|
|
5167
|
+
{
|
|
5168
|
+
"$ref": "#/definitions/NoRestrictedGlobalsConfigEnum"
|
|
5169
|
+
}
|
|
5170
|
+
],
|
|
5171
|
+
"additionalItems": {
|
|
5172
|
+
"$ref": "#/definitions/NoRestrictedGlobalsConfigEnum"
|
|
5173
|
+
},
|
|
5174
|
+
"minItems": 2
|
|
5175
|
+
}
|
|
5176
|
+
]
|
|
5119
5177
|
},
|
|
5120
5178
|
"no-restricted-imports": {
|
|
5121
5179
|
"anyOf": [
|
|
@@ -5634,6 +5692,29 @@
|
|
|
5634
5692
|
}
|
|
5635
5693
|
]
|
|
5636
5694
|
},
|
|
5695
|
+
"node/exports-style": {
|
|
5696
|
+
"anyOf": [
|
|
5697
|
+
{
|
|
5698
|
+
"$ref": "#/definitions/RuleNoConfig"
|
|
5699
|
+
},
|
|
5700
|
+
{
|
|
5701
|
+
"type": "array",
|
|
5702
|
+
"items": [
|
|
5703
|
+
{
|
|
5704
|
+
"$ref": "#/definitions/AllowWarnDeny"
|
|
5705
|
+
},
|
|
5706
|
+
{
|
|
5707
|
+
"$ref": "#/definitions/ExportsStyleMode"
|
|
5708
|
+
},
|
|
5709
|
+
{
|
|
5710
|
+
"$ref": "#/definitions/ExportsStyleOptions"
|
|
5711
|
+
}
|
|
5712
|
+
],
|
|
5713
|
+
"maxItems": 3,
|
|
5714
|
+
"minItems": 2
|
|
5715
|
+
}
|
|
5716
|
+
]
|
|
5717
|
+
},
|
|
5637
5718
|
"node/global-require": {
|
|
5638
5719
|
"$ref": "#/definitions/RuleNoConfig"
|
|
5639
5720
|
},
|
|
@@ -5726,6 +5807,26 @@
|
|
|
5726
5807
|
}
|
|
5727
5808
|
]
|
|
5728
5809
|
},
|
|
5810
|
+
"node/no-top-level-await": {
|
|
5811
|
+
"anyOf": [
|
|
5812
|
+
{
|
|
5813
|
+
"$ref": "#/definitions/RuleNoConfig"
|
|
5814
|
+
},
|
|
5815
|
+
{
|
|
5816
|
+
"type": "array",
|
|
5817
|
+
"items": [
|
|
5818
|
+
{
|
|
5819
|
+
"$ref": "#/definitions/AllowWarnDeny"
|
|
5820
|
+
},
|
|
5821
|
+
{
|
|
5822
|
+
"$ref": "#/definitions/NoTopLevelAwaitConfig"
|
|
5823
|
+
}
|
|
5824
|
+
],
|
|
5825
|
+
"maxItems": 2,
|
|
5826
|
+
"minItems": 2
|
|
5827
|
+
}
|
|
5828
|
+
]
|
|
5829
|
+
},
|
|
5729
5830
|
"object-shorthand": {
|
|
5730
5831
|
"anyOf": [
|
|
5731
5832
|
{
|
|
@@ -5784,6 +5885,9 @@
|
|
|
5784
5885
|
"oxc/bad-comparison-sequence": {
|
|
5785
5886
|
"$ref": "#/definitions/RuleNoConfig"
|
|
5786
5887
|
},
|
|
5888
|
+
"oxc/bad-match-all-arg": {
|
|
5889
|
+
"$ref": "#/definitions/RuleNoConfig"
|
|
5890
|
+
},
|
|
5787
5891
|
"oxc/bad-min-max-func": {
|
|
5788
5892
|
"$ref": "#/definitions/RuleNoConfig"
|
|
5789
5893
|
},
|
|
@@ -5987,7 +6091,7 @@
|
|
|
5987
6091
|
"$ref": "#/definitions/PreferDestructuringOption"
|
|
5988
6092
|
},
|
|
5989
6093
|
{
|
|
5990
|
-
"$ref": "#/definitions/
|
|
6094
|
+
"$ref": "#/definitions/PreferDestructuringEnforcementConfig"
|
|
5991
6095
|
}
|
|
5992
6096
|
],
|
|
5993
6097
|
"maxItems": 3,
|
|
@@ -6506,6 +6610,26 @@
|
|
|
6506
6610
|
"react/forward-ref-uses-ref": {
|
|
6507
6611
|
"$ref": "#/definitions/RuleNoConfig"
|
|
6508
6612
|
},
|
|
6613
|
+
"react/function-component-definition": {
|
|
6614
|
+
"anyOf": [
|
|
6615
|
+
{
|
|
6616
|
+
"$ref": "#/definitions/RuleNoConfig"
|
|
6617
|
+
},
|
|
6618
|
+
{
|
|
6619
|
+
"type": "array",
|
|
6620
|
+
"items": [
|
|
6621
|
+
{
|
|
6622
|
+
"$ref": "#/definitions/AllowWarnDeny"
|
|
6623
|
+
},
|
|
6624
|
+
{
|
|
6625
|
+
"$ref": "#/definitions/FunctionComponentDefinition"
|
|
6626
|
+
}
|
|
6627
|
+
],
|
|
6628
|
+
"maxItems": 2,
|
|
6629
|
+
"minItems": 2
|
|
6630
|
+
}
|
|
6631
|
+
]
|
|
6632
|
+
},
|
|
6509
6633
|
"react/hook-use-state": {
|
|
6510
6634
|
"anyOf": [
|
|
6511
6635
|
{
|
|
@@ -9777,6 +9901,9 @@
|
|
|
9777
9901
|
"vitest/padding-around-after-all-blocks": {
|
|
9778
9902
|
"$ref": "#/definitions/RuleNoConfig"
|
|
9779
9903
|
},
|
|
9904
|
+
"vitest/padding-around-test-blocks": {
|
|
9905
|
+
"$ref": "#/definitions/RuleNoConfig"
|
|
9906
|
+
},
|
|
9780
9907
|
"vitest/prefer-called-exactly-once-with": {
|
|
9781
9908
|
"$ref": "#/definitions/RuleNoConfig"
|
|
9782
9909
|
},
|
|
@@ -9857,7 +9984,24 @@
|
|
|
9857
9984
|
"$ref": "#/definitions/RuleNoConfig"
|
|
9858
9985
|
},
|
|
9859
9986
|
"vitest/prefer-lowercase-title": {
|
|
9860
|
-
"
|
|
9987
|
+
"anyOf": [
|
|
9988
|
+
{
|
|
9989
|
+
"$ref": "#/definitions/RuleNoConfig"
|
|
9990
|
+
},
|
|
9991
|
+
{
|
|
9992
|
+
"type": "array",
|
|
9993
|
+
"items": [
|
|
9994
|
+
{
|
|
9995
|
+
"$ref": "#/definitions/AllowWarnDeny"
|
|
9996
|
+
},
|
|
9997
|
+
{
|
|
9998
|
+
"$ref": "#/definitions/PreferLowercaseTitleConfig"
|
|
9999
|
+
}
|
|
10000
|
+
],
|
|
10001
|
+
"maxItems": 2,
|
|
10002
|
+
"minItems": 2
|
|
10003
|
+
}
|
|
10004
|
+
]
|
|
9861
10005
|
},
|
|
9862
10006
|
"vitest/prefer-mock-promise-shorthand": {
|
|
9863
10007
|
"$ref": "#/definitions/RuleNoConfig"
|
|
@@ -10795,6 +10939,51 @@
|
|
|
10795
10939
|
}
|
|
10796
10940
|
]
|
|
10797
10941
|
},
|
|
10942
|
+
"ExportsStyle": {
|
|
10943
|
+
"type": "array",
|
|
10944
|
+
"items": [
|
|
10945
|
+
{
|
|
10946
|
+
"$ref": "#/definitions/ExportsStyleMode"
|
|
10947
|
+
},
|
|
10948
|
+
{
|
|
10949
|
+
"$ref": "#/definitions/ExportsStyleOptions"
|
|
10950
|
+
}
|
|
10951
|
+
],
|
|
10952
|
+
"maxItems": 2,
|
|
10953
|
+
"minItems": 2
|
|
10954
|
+
},
|
|
10955
|
+
"ExportsStyleMode": {
|
|
10956
|
+
"oneOf": [
|
|
10957
|
+
{
|
|
10958
|
+
"description": "Requires `module.exports` and disallows `exports`",
|
|
10959
|
+
"type": "string",
|
|
10960
|
+
"enum": [
|
|
10961
|
+
"module.exports"
|
|
10962
|
+
],
|
|
10963
|
+
"markdownDescription": "Requires `module.exports` and disallows `exports`"
|
|
10964
|
+
},
|
|
10965
|
+
{
|
|
10966
|
+
"description": "Requires `exports` and disallows `module.exports`",
|
|
10967
|
+
"type": "string",
|
|
10968
|
+
"enum": [
|
|
10969
|
+
"exports"
|
|
10970
|
+
],
|
|
10971
|
+
"markdownDescription": "Requires `exports` and disallows `module.exports`"
|
|
10972
|
+
}
|
|
10973
|
+
]
|
|
10974
|
+
},
|
|
10975
|
+
"ExportsStyleOptions": {
|
|
10976
|
+
"type": "object",
|
|
10977
|
+
"properties": {
|
|
10978
|
+
"allowBatchAssign": {
|
|
10979
|
+
"description": "If this option is set to `true`, `module.exports = exports = obj` are allowed.",
|
|
10980
|
+
"default": false,
|
|
10981
|
+
"type": "boolean",
|
|
10982
|
+
"markdownDescription": "If this option is set to `true`, `module.exports = exports = obj` are allowed."
|
|
10983
|
+
}
|
|
10984
|
+
},
|
|
10985
|
+
"additionalProperties": false
|
|
10986
|
+
},
|
|
10798
10987
|
"ExtensionRule": {
|
|
10799
10988
|
"description": "Extension rule configuration; Copy to avoid extra indirection.",
|
|
10800
10989
|
"type": "string",
|
|
@@ -11210,6 +11399,31 @@
|
|
|
11210
11399
|
},
|
|
11211
11400
|
"additionalProperties": false
|
|
11212
11401
|
},
|
|
11402
|
+
"FunctionComponentDefinition": {
|
|
11403
|
+
"$ref": "#/definitions/FunctionComponentDefinitionConfig"
|
|
11404
|
+
},
|
|
11405
|
+
"FunctionComponentDefinitionConfig": {
|
|
11406
|
+
"type": "object",
|
|
11407
|
+
"properties": {
|
|
11408
|
+
"namedComponents": {
|
|
11409
|
+
"default": "function-declaration",
|
|
11410
|
+
"allOf": [
|
|
11411
|
+
{
|
|
11412
|
+
"$ref": "#/definitions/NamedComponents"
|
|
11413
|
+
}
|
|
11414
|
+
]
|
|
11415
|
+
},
|
|
11416
|
+
"unnamedComponents": {
|
|
11417
|
+
"default": "function-expression",
|
|
11418
|
+
"allOf": [
|
|
11419
|
+
{
|
|
11420
|
+
"$ref": "#/definitions/UnnamedComponents"
|
|
11421
|
+
}
|
|
11422
|
+
]
|
|
11423
|
+
}
|
|
11424
|
+
},
|
|
11425
|
+
"additionalProperties": false
|
|
11426
|
+
},
|
|
11213
11427
|
"GetterReturn": {
|
|
11214
11428
|
"type": "object",
|
|
11215
11429
|
"properties": {
|
|
@@ -11230,6 +11444,24 @@
|
|
|
11230
11444
|
},
|
|
11231
11445
|
"markdownDescription": "A set of glob patterns.\nPatterns are matched against paths relative to the configuration file's directory."
|
|
11232
11446
|
},
|
|
11447
|
+
"GlobalNameOrObject": {
|
|
11448
|
+
"anyOf": [
|
|
11449
|
+
{
|
|
11450
|
+
"description": "The name of a restricted global.",
|
|
11451
|
+
"type": "string",
|
|
11452
|
+
"markdownDescription": "The name of a restricted global."
|
|
11453
|
+
},
|
|
11454
|
+
{
|
|
11455
|
+
"description": "A restricted global with an optional custom message.",
|
|
11456
|
+
"allOf": [
|
|
11457
|
+
{
|
|
11458
|
+
"$ref": "#/definitions/RestrictedGlobal"
|
|
11459
|
+
}
|
|
11460
|
+
],
|
|
11461
|
+
"markdownDescription": "A restricted global with an optional custom message."
|
|
11462
|
+
}
|
|
11463
|
+
]
|
|
11464
|
+
},
|
|
11233
11465
|
"GlobalValue": {
|
|
11234
11466
|
"type": "string",
|
|
11235
11467
|
"enum": [
|
|
@@ -11344,6 +11576,13 @@
|
|
|
11344
11576
|
},
|
|
11345
11577
|
"additionalProperties": false
|
|
11346
11578
|
},
|
|
11579
|
+
"IdDenylist": {
|
|
11580
|
+
"type": "array",
|
|
11581
|
+
"additionalItems": {
|
|
11582
|
+
"type": "string"
|
|
11583
|
+
},
|
|
11584
|
+
"uniqueItems": true
|
|
11585
|
+
},
|
|
11347
11586
|
"IdLengthConfig": {
|
|
11348
11587
|
"type": "object",
|
|
11349
11588
|
"properties": {
|
|
@@ -12903,6 +13142,14 @@
|
|
|
12903
13142
|
"prefer-inline"
|
|
12904
13143
|
],
|
|
12905
13144
|
"markdownDescription": "Prefer `import { type Foo } from 'foo'` for type imports."
|
|
13145
|
+
},
|
|
13146
|
+
{
|
|
13147
|
+
"description": "Prefer `import type { Foo } from 'foo'` when all named imports are types, but allow\n`import { type Foo, bar } from 'foo'` when value imports are present.",
|
|
13148
|
+
"type": "string",
|
|
13149
|
+
"enum": [
|
|
13150
|
+
"prefer-top-level-if-only-type-imports"
|
|
13151
|
+
],
|
|
13152
|
+
"markdownDescription": "Prefer `import type { Foo } from 'foo'` when all named imports are types, but allow\n`import { type Foo, bar } from 'foo'` when value imports are present."
|
|
12906
13153
|
}
|
|
12907
13154
|
]
|
|
12908
13155
|
},
|
|
@@ -13033,6 +13280,27 @@
|
|
|
13033
13280
|
],
|
|
13034
13281
|
"markdownDescription": "Name specifier that can be a single string or array of strings"
|
|
13035
13282
|
},
|
|
13283
|
+
"NamedComponentStyle": {
|
|
13284
|
+
"type": "string",
|
|
13285
|
+
"enum": [
|
|
13286
|
+
"function-declaration",
|
|
13287
|
+
"arrow-function",
|
|
13288
|
+
"function-expression"
|
|
13289
|
+
]
|
|
13290
|
+
},
|
|
13291
|
+
"NamedComponents": {
|
|
13292
|
+
"anyOf": [
|
|
13293
|
+
{
|
|
13294
|
+
"$ref": "#/definitions/NamedComponentStyle"
|
|
13295
|
+
},
|
|
13296
|
+
{
|
|
13297
|
+
"type": "array",
|
|
13298
|
+
"items": {
|
|
13299
|
+
"$ref": "#/definitions/NamedComponentStyle"
|
|
13300
|
+
}
|
|
13301
|
+
}
|
|
13302
|
+
]
|
|
13303
|
+
},
|
|
13036
13304
|
"NamedExports": {
|
|
13037
13305
|
"type": "string",
|
|
13038
13306
|
"enum": [
|
|
@@ -14990,6 +15258,58 @@
|
|
|
14990
15258
|
},
|
|
14991
15259
|
"additionalProperties": false
|
|
14992
15260
|
},
|
|
15261
|
+
"NoRestrictedGlobalsConfigEnum": {
|
|
15262
|
+
"anyOf": [
|
|
15263
|
+
{
|
|
15264
|
+
"type": "string"
|
|
15265
|
+
},
|
|
15266
|
+
{
|
|
15267
|
+
"$ref": "#/definitions/RestrictedGlobal"
|
|
15268
|
+
},
|
|
15269
|
+
{
|
|
15270
|
+
"$ref": "#/definitions/NoRestrictedGlobalsObjectConfig"
|
|
15271
|
+
}
|
|
15272
|
+
]
|
|
15273
|
+
},
|
|
15274
|
+
"NoRestrictedGlobalsConfigValue": {
|
|
15275
|
+
"additionalItems": {
|
|
15276
|
+
"$ref": "#/definitions/NoRestrictedGlobalsConfigEnum"
|
|
15277
|
+
}
|
|
15278
|
+
},
|
|
15279
|
+
"NoRestrictedGlobalsObjectConfig": {
|
|
15280
|
+
"description": "Object form of the configuration, which additionally allows detecting\nrestricted globals accessed via global objects.",
|
|
15281
|
+
"type": "object",
|
|
15282
|
+
"required": [
|
|
15283
|
+
"globals"
|
|
15284
|
+
],
|
|
15285
|
+
"properties": {
|
|
15286
|
+
"checkGlobalObject": {
|
|
15287
|
+
"description": "Whether to also detect restricted globals accessed via global objects. Default is `false`.",
|
|
15288
|
+
"default": false,
|
|
15289
|
+
"type": "boolean",
|
|
15290
|
+
"markdownDescription": "Whether to also detect restricted globals accessed via global objects. Default is `false`."
|
|
15291
|
+
},
|
|
15292
|
+
"globalObjects": {
|
|
15293
|
+
"description": "Additional global object names to check when `checkGlobalObject` is enabled.\nBy default, the rule checks these global objects: `globalThis`, `self`, and `window`.",
|
|
15294
|
+
"default": [],
|
|
15295
|
+
"type": "array",
|
|
15296
|
+
"items": {
|
|
15297
|
+
"type": "string"
|
|
15298
|
+
},
|
|
15299
|
+
"markdownDescription": "Additional global object names to check when `checkGlobalObject` is enabled.\nBy default, the rule checks these global objects: `globalThis`, `self`, and `window`."
|
|
15300
|
+
},
|
|
15301
|
+
"globals": {
|
|
15302
|
+
"description": "The restricted globals, as names or `{ \"name\", \"message\" }` objects.",
|
|
15303
|
+
"type": "array",
|
|
15304
|
+
"items": {
|
|
15305
|
+
"$ref": "#/definitions/GlobalNameOrObject"
|
|
15306
|
+
},
|
|
15307
|
+
"markdownDescription": "The restricted globals, as names or `{ \"name\", \"message\" }` objects."
|
|
15308
|
+
}
|
|
15309
|
+
},
|
|
15310
|
+
"additionalProperties": false,
|
|
15311
|
+
"markdownDescription": "Object form of the configuration, which additionally allows detecting\nrestricted globals accessed via global objects."
|
|
15312
|
+
},
|
|
14993
15313
|
"NoRestrictedImportsConfig": {
|
|
14994
15314
|
"type": "object",
|
|
14995
15315
|
"properties": {
|
|
@@ -15276,6 +15596,18 @@
|
|
|
15276
15596
|
},
|
|
15277
15597
|
"additionalProperties": false
|
|
15278
15598
|
},
|
|
15599
|
+
"NoTopLevelAwaitConfig": {
|
|
15600
|
+
"type": "object",
|
|
15601
|
+
"properties": {
|
|
15602
|
+
"ignoreBin": {
|
|
15603
|
+
"description": "If `true`, top-level `await` is allowed in files that start with a\nhashbang (`#!`), which marks them as executable scripts rather than\nimportable modules.",
|
|
15604
|
+
"default": false,
|
|
15605
|
+
"type": "boolean",
|
|
15606
|
+
"markdownDescription": "If `true`, top-level `await` is allowed in files that start with a\nhashbang (`#!`), which marks them as executable scripts rather than\nimportable modules."
|
|
15607
|
+
}
|
|
15608
|
+
},
|
|
15609
|
+
"additionalProperties": false
|
|
15610
|
+
},
|
|
15279
15611
|
"NoTypeofUndefined": {
|
|
15280
15612
|
"type": "object",
|
|
15281
15613
|
"properties": {
|
|
@@ -16939,12 +17271,26 @@
|
|
|
16939
17271
|
"$ref": "#/definitions/PreferDestructuringOption"
|
|
16940
17272
|
},
|
|
16941
17273
|
{
|
|
16942
|
-
"$ref": "#/definitions/
|
|
17274
|
+
"$ref": "#/definitions/PreferDestructuringEnforcementConfig"
|
|
16943
17275
|
}
|
|
16944
17276
|
],
|
|
16945
17277
|
"maxItems": 2,
|
|
16946
17278
|
"minItems": 2
|
|
16947
17279
|
},
|
|
17280
|
+
"PreferDestructuringEnforcementConfig": {
|
|
17281
|
+
"type": "object",
|
|
17282
|
+
"properties": {
|
|
17283
|
+
"enforceForDeclarationWithTypeAnnotation": {
|
|
17284
|
+
"default": false,
|
|
17285
|
+
"type": "boolean"
|
|
17286
|
+
},
|
|
17287
|
+
"enforceForRenamedProperties": {
|
|
17288
|
+
"default": false,
|
|
17289
|
+
"type": "boolean"
|
|
17290
|
+
}
|
|
17291
|
+
},
|
|
17292
|
+
"additionalProperties": false
|
|
17293
|
+
},
|
|
16948
17294
|
"PreferDestructuringOption": {
|
|
16949
17295
|
"anyOf": [
|
|
16950
17296
|
{
|
|
@@ -16955,16 +17301,6 @@
|
|
|
16955
17301
|
}
|
|
16956
17302
|
]
|
|
16957
17303
|
},
|
|
16958
|
-
"PreferDestructuringRenamedPropertiesConfig": {
|
|
16959
|
-
"type": "object",
|
|
16960
|
-
"properties": {
|
|
16961
|
-
"enforceForRenamedProperties": {
|
|
16962
|
-
"default": false,
|
|
16963
|
-
"type": "boolean"
|
|
16964
|
-
}
|
|
16965
|
-
},
|
|
16966
|
-
"additionalProperties": false
|
|
16967
|
-
},
|
|
16968
17304
|
"PreferDestructuringTargetOption": {
|
|
16969
17305
|
"type": "object",
|
|
16970
17306
|
"properties": {
|
|
@@ -17116,6 +17452,42 @@
|
|
|
17116
17452
|
},
|
|
17117
17453
|
"additionalProperties": false
|
|
17118
17454
|
},
|
|
17455
|
+
"PreferLowercaseTitleConfig": {
|
|
17456
|
+
"type": "object",
|
|
17457
|
+
"properties": {
|
|
17458
|
+
"allowedPrefixes": {
|
|
17459
|
+
"description": "This array option allows specifying prefixes, which contain capitals that titles\ncan start with. This can be useful when writing tests for API endpoints, where\nyou'd like to prefix with the HTTP method.\nBy default, nothing is allowed (the equivalent of `{ \"allowedPrefixes\": [] }`).\n\nExample of **correct** code for the `{ \"allowedPrefixes\": [\"GET\"] }` option:\n```js\n/* jest/prefer-lowercase-title: [\"error\", { \"allowedPrefixes\": [\"GET\"] }] */\ndescribe('GET /live');\n```",
|
|
17460
|
+
"default": [],
|
|
17461
|
+
"type": "array",
|
|
17462
|
+
"items": {
|
|
17463
|
+
"type": "string"
|
|
17464
|
+
},
|
|
17465
|
+
"markdownDescription": "This array option allows specifying prefixes, which contain capitals that titles\ncan start with. This can be useful when writing tests for API endpoints, where\nyou'd like to prefix with the HTTP method.\nBy default, nothing is allowed (the equivalent of `{ \"allowedPrefixes\": [] }`).\n\nExample of **correct** code for the `{ \"allowedPrefixes\": [\"GET\"] }` option:\n```js\n/* jest/prefer-lowercase-title: [\"error\", { \"allowedPrefixes\": [\"GET\"] }] */\ndescribe('GET /live');\n```"
|
|
17466
|
+
},
|
|
17467
|
+
"ignore": {
|
|
17468
|
+
"description": "This array option controls which Jest or Vitest functions are checked by this rule. There\nare four possible values:\n- `\"describe\"`\n- `\"test\"`\n- `\"it\"`\n- `\"bench\"`\n\nBy default, none of these options are enabled (the equivalent of\n`{ \"ignore\": [] }`).\n\nExample of **correct** code for the `{ \"ignore\": [\"describe\"] }` option:\n```js\n/* jest/prefer-lowercase-title: [\"error\", { \"ignore\": [\"describe\"] }] */\ndescribe('Uppercase description');\n```\n\nExample of **correct** code for the `{ \"ignore\": [\"test\"] }` option:\n```js\n/* jest/prefer-lowercase-title: [\"error\", { \"ignore\": [\"test\"] }] */\ntest('Uppercase description');\n```\n\nExample of **correct** code for the `{ \"ignore\": [\"it\"] }` option:\n```js\n/* jest/prefer-lowercase-title: [\"error\", { \"ignore\": [\"it\"] }] */\nit('Uppercase description');\n```",
|
|
17469
|
+
"default": [],
|
|
17470
|
+
"type": "array",
|
|
17471
|
+
"items": {
|
|
17472
|
+
"type": "string"
|
|
17473
|
+
},
|
|
17474
|
+
"markdownDescription": "This array option controls which Jest or Vitest functions are checked by this rule. There\nare four possible values:\n- `\"describe\"`\n- `\"test\"`\n- `\"it\"`\n- `\"bench\"`\n\nBy default, none of these options are enabled (the equivalent of\n`{ \"ignore\": [] }`).\n\nExample of **correct** code for the `{ \"ignore\": [\"describe\"] }` option:\n```js\n/* jest/prefer-lowercase-title: [\"error\", { \"ignore\": [\"describe\"] }] */\ndescribe('Uppercase description');\n```\n\nExample of **correct** code for the `{ \"ignore\": [\"test\"] }` option:\n```js\n/* jest/prefer-lowercase-title: [\"error\", { \"ignore\": [\"test\"] }] */\ntest('Uppercase description');\n```\n\nExample of **correct** code for the `{ \"ignore\": [\"it\"] }` option:\n```js\n/* jest/prefer-lowercase-title: [\"error\", { \"ignore\": [\"it\"] }] */\nit('Uppercase description');\n```"
|
|
17475
|
+
},
|
|
17476
|
+
"ignoreTopLevelDescribe": {
|
|
17477
|
+
"description": "This option can be set to allow only the top-level `describe` blocks to have a\ntitle starting with an upper-case letter.\n\nExample of **correct** code for the `{ \"ignoreTopLevelDescribe\": true }` option:\n```js\n/* jest/prefer-lowercase-title: [\"error\", { \"ignoreTopLevelDescribe\": true }] */\ndescribe('MyClass', () => {\ndescribe('#myMethod', () => {\nit('does things', () => {\n//\n});\n});\n});\n```",
|
|
17478
|
+
"default": false,
|
|
17479
|
+
"type": "boolean",
|
|
17480
|
+
"markdownDescription": "This option can be set to allow only the top-level `describe` blocks to have a\ntitle starting with an upper-case letter.\n\nExample of **correct** code for the `{ \"ignoreTopLevelDescribe\": true }` option:\n```js\n/* jest/prefer-lowercase-title: [\"error\", { \"ignoreTopLevelDescribe\": true }] */\ndescribe('MyClass', () => {\ndescribe('#myMethod', () => {\nit('does things', () => {\n//\n});\n});\n});\n```"
|
|
17481
|
+
},
|
|
17482
|
+
"lowercaseFirstCharacterOnly": {
|
|
17483
|
+
"description": "This option can be set to only validate that the first character of a test name is lowercased.\n\nExample of **correct** code for the `{ \"lowercaseFirstCharacterOnly\": true }` option:\n```js\n/* vitest/prefer-lowercase-title: [\"error\", { \"lowercaseFirstCharacterOnly\": true }] */\ndescribe('myClass', () => {\ndescribe('myMethod', () => {\nit('does things', () => {\n//\n});\n});\n});\n```\n\nExample of **incorrect** code for the `{ \"lowercaseFirstCharacterOnly\": true }` option:\n```js\n/* vitest/prefer-lowercase-title: [\"error\", { \"lowercaseFirstCharacterOnly\": true }] */\ndescribe('MyClass', () => {\ndescribe('MyMethod', () => {\nit('does things', () => {\n//\n});\n});\n});\n```",
|
|
17484
|
+
"default": true,
|
|
17485
|
+
"type": "boolean",
|
|
17486
|
+
"markdownDescription": "This option can be set to only validate that the first character of a test name is lowercased.\n\nExample of **correct** code for the `{ \"lowercaseFirstCharacterOnly\": true }` option:\n```js\n/* vitest/prefer-lowercase-title: [\"error\", { \"lowercaseFirstCharacterOnly\": true }] */\ndescribe('myClass', () => {\ndescribe('myMethod', () => {\nit('does things', () => {\n//\n});\n});\n});\n```\n\nExample of **incorrect** code for the `{ \"lowercaseFirstCharacterOnly\": true }` option:\n```js\n/* vitest/prefer-lowercase-title: [\"error\", { \"lowercaseFirstCharacterOnly\": true }] */\ndescribe('MyClass', () => {\ndescribe('MyMethod', () => {\nit('does things', () => {\n//\n});\n});\n});\n```"
|
|
17487
|
+
}
|
|
17488
|
+
},
|
|
17489
|
+
"additionalProperties": false
|
|
17490
|
+
},
|
|
17119
17491
|
"PreferNullishCoalescingConfig": {
|
|
17120
17492
|
"type": "object",
|
|
17121
17493
|
"properties": {
|
|
@@ -18127,6 +18499,27 @@
|
|
|
18127
18499
|
},
|
|
18128
18500
|
"additionalProperties": false
|
|
18129
18501
|
},
|
|
18502
|
+
"RestrictedGlobal": {
|
|
18503
|
+
"description": "A restricted global with an optional custom message.",
|
|
18504
|
+
"type": "object",
|
|
18505
|
+
"required": [
|
|
18506
|
+
"name"
|
|
18507
|
+
],
|
|
18508
|
+
"properties": {
|
|
18509
|
+
"message": {
|
|
18510
|
+
"description": "A custom message shown when the restricted global is used.",
|
|
18511
|
+
"type": "string",
|
|
18512
|
+
"markdownDescription": "A custom message shown when the restricted global is used."
|
|
18513
|
+
},
|
|
18514
|
+
"name": {
|
|
18515
|
+
"description": "The name of the restricted global.",
|
|
18516
|
+
"type": "string",
|
|
18517
|
+
"markdownDescription": "The name of the restricted global."
|
|
18518
|
+
}
|
|
18519
|
+
},
|
|
18520
|
+
"additionalProperties": false,
|
|
18521
|
+
"markdownDescription": "A restricted global with an optional custom message."
|
|
18522
|
+
},
|
|
18130
18523
|
"RestrictedPath": {
|
|
18131
18524
|
"type": "object",
|
|
18132
18525
|
"required": [
|
|
@@ -18806,6 +19199,26 @@
|
|
|
18806
19199
|
},
|
|
18807
19200
|
"additionalProperties": false
|
|
18808
19201
|
},
|
|
19202
|
+
"UnnamedComponentStyle": {
|
|
19203
|
+
"type": "string",
|
|
19204
|
+
"enum": [
|
|
19205
|
+
"arrow-function",
|
|
19206
|
+
"function-expression"
|
|
19207
|
+
]
|
|
19208
|
+
},
|
|
19209
|
+
"UnnamedComponents": {
|
|
19210
|
+
"anyOf": [
|
|
19211
|
+
{
|
|
19212
|
+
"$ref": "#/definitions/UnnamedComponentStyle"
|
|
19213
|
+
},
|
|
19214
|
+
{
|
|
19215
|
+
"type": "array",
|
|
19216
|
+
"items": {
|
|
19217
|
+
"$ref": "#/definitions/UnnamedComponentStyle"
|
|
19218
|
+
}
|
|
19219
|
+
}
|
|
19220
|
+
]
|
|
19221
|
+
},
|
|
18809
19222
|
"UseIsnan": {
|
|
18810
19223
|
"type": "object",
|
|
18811
19224
|
"properties": {
|