@depup/oxlint 1.75.0-depup.0 → 1.77.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 +329 -18
- package/dist/bindings.js +96 -42
- package/dist/index.d.ts +195 -13
- package/dist/lint.js +272 -142
- package/dist/plugins-dev.d.ts +1 -1
- package/dist/plugins-dev.js +15 -15
- package/dist/plugins.js +1 -1
- package/dist/workspace2.js +2 -1
- package/package.json +22 -22
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-
|
|
16
|
+
| Original | [oxlint](https://www.npmjs.com/package/oxlint) @ 1.77.0 |
|
|
17
|
+
| Processed | 2026-08-03 |
|
|
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": [
|
|
@@ -5603,7 +5661,7 @@
|
|
|
5603
5661
|
"$ref": "#/definitions/AllowWarnDeny"
|
|
5604
5662
|
},
|
|
5605
5663
|
{
|
|
5606
|
-
"$ref": "#/definitions/
|
|
5664
|
+
"$ref": "#/definitions/NoWarningCommentsConfig"
|
|
5607
5665
|
}
|
|
5608
5666
|
],
|
|
5609
5667
|
"maxItems": 2,
|
|
@@ -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
|
},
|
|
@@ -5804,6 +5885,9 @@
|
|
|
5804
5885
|
"oxc/bad-comparison-sequence": {
|
|
5805
5886
|
"$ref": "#/definitions/RuleNoConfig"
|
|
5806
5887
|
},
|
|
5888
|
+
"oxc/bad-match-all-arg": {
|
|
5889
|
+
"$ref": "#/definitions/RuleNoConfig"
|
|
5890
|
+
},
|
|
5807
5891
|
"oxc/bad-min-max-func": {
|
|
5808
5892
|
"$ref": "#/definitions/RuleNoConfig"
|
|
5809
5893
|
},
|
|
@@ -9900,7 +9984,24 @@
|
|
|
9900
9984
|
"$ref": "#/definitions/RuleNoConfig"
|
|
9901
9985
|
},
|
|
9902
9986
|
"vitest/prefer-lowercase-title": {
|
|
9903
|
-
"
|
|
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
|
+
]
|
|
9904
10005
|
},
|
|
9905
10006
|
"vitest/prefer-mock-promise-shorthand": {
|
|
9906
10007
|
"$ref": "#/definitions/RuleNoConfig"
|
|
@@ -10838,6 +10939,51 @@
|
|
|
10838
10939
|
}
|
|
10839
10940
|
]
|
|
10840
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
|
+
},
|
|
10841
10987
|
"ExtensionRule": {
|
|
10842
10988
|
"description": "Extension rule configuration; Copy to avoid extra indirection.",
|
|
10843
10989
|
"type": "string",
|
|
@@ -11298,6 +11444,24 @@
|
|
|
11298
11444
|
},
|
|
11299
11445
|
"markdownDescription": "A set of glob patterns.\nPatterns are matched against paths relative to the configuration file's directory."
|
|
11300
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
|
+
},
|
|
11301
11465
|
"GlobalValue": {
|
|
11302
11466
|
"type": "string",
|
|
11303
11467
|
"enum": [
|
|
@@ -11412,6 +11576,13 @@
|
|
|
11412
11576
|
},
|
|
11413
11577
|
"additionalProperties": false
|
|
11414
11578
|
},
|
|
11579
|
+
"IdDenylist": {
|
|
11580
|
+
"type": "array",
|
|
11581
|
+
"additionalItems": {
|
|
11582
|
+
"type": "string"
|
|
11583
|
+
},
|
|
11584
|
+
"uniqueItems": true
|
|
11585
|
+
},
|
|
11415
11586
|
"IdLengthConfig": {
|
|
11416
11587
|
"type": "object",
|
|
11417
11588
|
"properties": {
|
|
@@ -12507,10 +12678,23 @@
|
|
|
12507
12678
|
}
|
|
12508
12679
|
},
|
|
12509
12680
|
"Location": {
|
|
12510
|
-
"
|
|
12511
|
-
|
|
12512
|
-
|
|
12513
|
-
|
|
12681
|
+
"oneOf": [
|
|
12682
|
+
{
|
|
12683
|
+
"description": "Terms must appear at the start of the comment, after any decoration.",
|
|
12684
|
+
"type": "string",
|
|
12685
|
+
"enum": [
|
|
12686
|
+
"start"
|
|
12687
|
+
],
|
|
12688
|
+
"markdownDescription": "Terms must appear at the start of the comment, after any decoration."
|
|
12689
|
+
},
|
|
12690
|
+
{
|
|
12691
|
+
"description": "Terms can appear anywhere in the comment.",
|
|
12692
|
+
"type": "string",
|
|
12693
|
+
"enum": [
|
|
12694
|
+
"anywhere"
|
|
12695
|
+
],
|
|
12696
|
+
"markdownDescription": "Terms can appear anywhere in the comment."
|
|
12697
|
+
}
|
|
12514
12698
|
]
|
|
12515
12699
|
},
|
|
12516
12700
|
"LogicalAssignmentOperators": {
|
|
@@ -15087,6 +15271,58 @@
|
|
|
15087
15271
|
},
|
|
15088
15272
|
"additionalProperties": false
|
|
15089
15273
|
},
|
|
15274
|
+
"NoRestrictedGlobalsConfigEnum": {
|
|
15275
|
+
"anyOf": [
|
|
15276
|
+
{
|
|
15277
|
+
"type": "string"
|
|
15278
|
+
},
|
|
15279
|
+
{
|
|
15280
|
+
"$ref": "#/definitions/RestrictedGlobal"
|
|
15281
|
+
},
|
|
15282
|
+
{
|
|
15283
|
+
"$ref": "#/definitions/NoRestrictedGlobalsObjectConfig"
|
|
15284
|
+
}
|
|
15285
|
+
]
|
|
15286
|
+
},
|
|
15287
|
+
"NoRestrictedGlobalsConfigValue": {
|
|
15288
|
+
"additionalItems": {
|
|
15289
|
+
"$ref": "#/definitions/NoRestrictedGlobalsConfigEnum"
|
|
15290
|
+
}
|
|
15291
|
+
},
|
|
15292
|
+
"NoRestrictedGlobalsObjectConfig": {
|
|
15293
|
+
"description": "Object form of the configuration, which additionally allows detecting\nrestricted globals accessed via global objects.",
|
|
15294
|
+
"type": "object",
|
|
15295
|
+
"required": [
|
|
15296
|
+
"globals"
|
|
15297
|
+
],
|
|
15298
|
+
"properties": {
|
|
15299
|
+
"checkGlobalObject": {
|
|
15300
|
+
"description": "Whether to also detect restricted globals accessed via global objects. Default is `false`.",
|
|
15301
|
+
"default": false,
|
|
15302
|
+
"type": "boolean",
|
|
15303
|
+
"markdownDescription": "Whether to also detect restricted globals accessed via global objects. Default is `false`."
|
|
15304
|
+
},
|
|
15305
|
+
"globalObjects": {
|
|
15306
|
+
"description": "Additional global object names to check when `checkGlobalObject` is enabled.\nBy default, the rule checks these global objects: `globalThis`, `self`, and `window`.",
|
|
15307
|
+
"default": [],
|
|
15308
|
+
"type": "array",
|
|
15309
|
+
"items": {
|
|
15310
|
+
"type": "string"
|
|
15311
|
+
},
|
|
15312
|
+
"markdownDescription": "Additional global object names to check when `checkGlobalObject` is enabled.\nBy default, the rule checks these global objects: `globalThis`, `self`, and `window`."
|
|
15313
|
+
},
|
|
15314
|
+
"globals": {
|
|
15315
|
+
"description": "The restricted globals, as names or `{ \"name\", \"message\" }` objects.",
|
|
15316
|
+
"type": "array",
|
|
15317
|
+
"items": {
|
|
15318
|
+
"$ref": "#/definitions/GlobalNameOrObject"
|
|
15319
|
+
},
|
|
15320
|
+
"markdownDescription": "The restricted globals, as names or `{ \"name\", \"message\" }` objects."
|
|
15321
|
+
}
|
|
15322
|
+
},
|
|
15323
|
+
"additionalProperties": false,
|
|
15324
|
+
"markdownDescription": "Object form of the configuration, which additionally allows detecting\nrestricted globals accessed via global objects."
|
|
15325
|
+
},
|
|
15090
15326
|
"NoRestrictedImportsConfig": {
|
|
15091
15327
|
"type": "object",
|
|
15092
15328
|
"properties": {
|
|
@@ -15540,20 +15776,20 @@
|
|
|
15540
15776
|
"type": "object",
|
|
15541
15777
|
"properties": {
|
|
15542
15778
|
"allowConstantLoopConditions": {
|
|
15543
|
-
"description": "
|
|
15779
|
+
"description": "Controls which constant conditions are allowed in `while`, `do...while`, and `for` loops.\n\n- `\"never\"` (or `false`) reports all constant loop conditions.\n- `\"always\"` (or `true`) allows conditions whose type is the literal type `true`, such as\n`while (true)` or `while (variable)` when `variable` has type `true`.\n- `\"only-allowed-literals\"` allows only the literal expressions `true`, `false`, `0`, and\n`1`. Variables whose types are those literal types are still reported.",
|
|
15544
15780
|
"default": "never",
|
|
15545
15781
|
"allOf": [
|
|
15546
15782
|
{
|
|
15547
15783
|
"$ref": "#/definitions/AllowConstantLoopConditions"
|
|
15548
15784
|
}
|
|
15549
15785
|
],
|
|
15550
|
-
"markdownDescription": "
|
|
15786
|
+
"markdownDescription": "Controls which constant conditions are allowed in `while`, `do...while`, and `for` loops.\n\n- `\"never\"` (or `false`) reports all constant loop conditions.\n- `\"always\"` (or `true`) allows conditions whose type is the literal type `true`, such as\n`while (true)` or `while (variable)` when `variable` has type `true`.\n- `\"only-allowed-literals\"` allows only the literal expressions `true`, `false`, `0`, and\n`1`. Variables whose types are those literal types are still reported."
|
|
15551
15787
|
},
|
|
15552
15788
|
"checkTypePredicates": {
|
|
15553
|
-
"description": "Whether to check type predicate functions
|
|
15789
|
+
"description": "Whether to check arguments passed to type predicate and assertion functions.\n\nWhen enabled, the rule reports a call if the argument already satisfies the predicate or\nif an assertion function receives an argument that is always truthy or always falsy.\n\nFor example, `narrow(value)` is unnecessary because `value` already has type `true`:\n\n```ts\ndeclare const narrow: (value: unknown) => value is true;\nconst value = true;\nif (narrow(value)) {\n// ...\n}\n```",
|
|
15554
15790
|
"default": false,
|
|
15555
15791
|
"type": "boolean",
|
|
15556
|
-
"markdownDescription": "Whether to check type predicate functions
|
|
15792
|
+
"markdownDescription": "Whether to check arguments passed to type predicate and assertion functions.\n\nWhen enabled, the rule reports a call if the argument already satisfies the predicate or\nif an assertion function receives an argument that is always truthy or always falsy.\n\nFor example, `narrow(value)` is unnecessary because `value` already has type `true`:\n\n```ts\ndeclare const narrow: (value: unknown) => value is true;\nconst value = true;\nif (narrow(value)) {\n// ...\n}\n```"
|
|
15557
15793
|
}
|
|
15558
15794
|
},
|
|
15559
15795
|
"additionalProperties": false
|
|
@@ -16058,23 +16294,41 @@
|
|
|
16058
16294
|
},
|
|
16059
16295
|
"additionalProperties": false
|
|
16060
16296
|
},
|
|
16061
|
-
"
|
|
16297
|
+
"NoWarningCommentsConfig": {
|
|
16062
16298
|
"type": "object",
|
|
16063
16299
|
"properties": {
|
|
16064
16300
|
"decoration": {
|
|
16301
|
+
"description": "An array of characters to ignore at the start of comments when `location` is `\"start\"`.\n\nUseful for ignoring common comment decorations like `*` in JSDoc-style comments.",
|
|
16302
|
+
"default": [],
|
|
16065
16303
|
"type": "array",
|
|
16066
16304
|
"items": {
|
|
16067
16305
|
"type": "string"
|
|
16068
|
-
}
|
|
16306
|
+
},
|
|
16307
|
+
"uniqueItems": true,
|
|
16308
|
+
"markdownDescription": "An array of characters to ignore at the start of comments when `location` is `\"start\"`.\n\nUseful for ignoring common comment decorations like `*` in JSDoc-style comments."
|
|
16069
16309
|
},
|
|
16070
16310
|
"location": {
|
|
16071
|
-
"
|
|
16311
|
+
"description": "Where to check for the terms.",
|
|
16312
|
+
"default": "start",
|
|
16313
|
+
"allOf": [
|
|
16314
|
+
{
|
|
16315
|
+
"$ref": "#/definitions/Location"
|
|
16316
|
+
}
|
|
16317
|
+
],
|
|
16318
|
+
"markdownDescription": "Where to check for the terms."
|
|
16072
16319
|
},
|
|
16073
16320
|
"terms": {
|
|
16321
|
+
"description": "An array of terms to match. The matching is case-insensitive.",
|
|
16322
|
+
"default": [
|
|
16323
|
+
"todo",
|
|
16324
|
+
"fixme",
|
|
16325
|
+
"xxx"
|
|
16326
|
+
],
|
|
16074
16327
|
"type": "array",
|
|
16075
16328
|
"items": {
|
|
16076
16329
|
"type": "string"
|
|
16077
|
-
}
|
|
16330
|
+
},
|
|
16331
|
+
"markdownDescription": "An array of terms to match. The matching is case-insensitive."
|
|
16078
16332
|
}
|
|
16079
16333
|
},
|
|
16080
16334
|
"additionalProperties": false
|
|
@@ -17229,6 +17483,42 @@
|
|
|
17229
17483
|
},
|
|
17230
17484
|
"additionalProperties": false
|
|
17231
17485
|
},
|
|
17486
|
+
"PreferLowercaseTitleConfig": {
|
|
17487
|
+
"type": "object",
|
|
17488
|
+
"properties": {
|
|
17489
|
+
"allowedPrefixes": {
|
|
17490
|
+
"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```",
|
|
17491
|
+
"default": [],
|
|
17492
|
+
"type": "array",
|
|
17493
|
+
"items": {
|
|
17494
|
+
"type": "string"
|
|
17495
|
+
},
|
|
17496
|
+
"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```"
|
|
17497
|
+
},
|
|
17498
|
+
"ignore": {
|
|
17499
|
+
"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```",
|
|
17500
|
+
"default": [],
|
|
17501
|
+
"type": "array",
|
|
17502
|
+
"items": {
|
|
17503
|
+
"type": "string"
|
|
17504
|
+
},
|
|
17505
|
+
"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```"
|
|
17506
|
+
},
|
|
17507
|
+
"ignoreTopLevelDescribe": {
|
|
17508
|
+
"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```",
|
|
17509
|
+
"default": false,
|
|
17510
|
+
"type": "boolean",
|
|
17511
|
+
"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```"
|
|
17512
|
+
},
|
|
17513
|
+
"lowercaseFirstCharacterOnly": {
|
|
17514
|
+
"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```",
|
|
17515
|
+
"default": true,
|
|
17516
|
+
"type": "boolean",
|
|
17517
|
+
"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```"
|
|
17518
|
+
}
|
|
17519
|
+
},
|
|
17520
|
+
"additionalProperties": false
|
|
17521
|
+
},
|
|
17232
17522
|
"PreferNullishCoalescingConfig": {
|
|
17233
17523
|
"type": "object",
|
|
17234
17524
|
"properties": {
|
|
@@ -18240,6 +18530,27 @@
|
|
|
18240
18530
|
},
|
|
18241
18531
|
"additionalProperties": false
|
|
18242
18532
|
},
|
|
18533
|
+
"RestrictedGlobal": {
|
|
18534
|
+
"description": "A restricted global with an optional custom message.",
|
|
18535
|
+
"type": "object",
|
|
18536
|
+
"required": [
|
|
18537
|
+
"name"
|
|
18538
|
+
],
|
|
18539
|
+
"properties": {
|
|
18540
|
+
"message": {
|
|
18541
|
+
"description": "A custom message shown when the restricted global is used.",
|
|
18542
|
+
"type": "string",
|
|
18543
|
+
"markdownDescription": "A custom message shown when the restricted global is used."
|
|
18544
|
+
},
|
|
18545
|
+
"name": {
|
|
18546
|
+
"description": "The name of the restricted global.",
|
|
18547
|
+
"type": "string",
|
|
18548
|
+
"markdownDescription": "The name of the restricted global."
|
|
18549
|
+
}
|
|
18550
|
+
},
|
|
18551
|
+
"additionalProperties": false,
|
|
18552
|
+
"markdownDescription": "A restricted global with an optional custom message."
|
|
18553
|
+
},
|
|
18243
18554
|
"RestrictedPath": {
|
|
18244
18555
|
"type": "object",
|
|
18245
18556
|
"required": [
|