oxlint 1.72.0 → 1.73.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.
@@ -4441,7 +4441,24 @@
4441
4441
  "$ref": "#/definitions/RuleNoConfig"
4442
4442
  },
4443
4443
  "no-constant-binary-expression": {
4444
- "$ref": "#/definitions/RuleNoConfig"
4444
+ "anyOf": [
4445
+ {
4446
+ "$ref": "#/definitions/RuleNoConfig"
4447
+ },
4448
+ {
4449
+ "type": "array",
4450
+ "items": [
4451
+ {
4452
+ "$ref": "#/definitions/AllowWarnDeny"
4453
+ },
4454
+ {
4455
+ "$ref": "#/definitions/NoConstantBinaryExpressionConfig"
4456
+ }
4457
+ ],
4458
+ "maxItems": 2,
4459
+ "minItems": 2
4460
+ }
4461
+ ]
4445
4462
  },
4446
4463
  "no-constant-condition": {
4447
4464
  "anyOf": [
@@ -5324,6 +5341,26 @@
5324
5341
  "no-unreachable": {
5325
5342
  "$ref": "#/definitions/RuleNoConfig"
5326
5343
  },
5344
+ "no-unreachable-loop": {
5345
+ "anyOf": [
5346
+ {
5347
+ "$ref": "#/definitions/RuleNoConfig"
5348
+ },
5349
+ {
5350
+ "type": "array",
5351
+ "items": [
5352
+ {
5353
+ "$ref": "#/definitions/AllowWarnDeny"
5354
+ },
5355
+ {
5356
+ "$ref": "#/definitions/NoUnreachableLoop"
5357
+ }
5358
+ ],
5359
+ "maxItems": 2,
5360
+ "minItems": 2
5361
+ }
5362
+ ]
5363
+ },
5327
5364
  "no-unsafe-finally": {
5328
5365
  "$ref": "#/definitions/RuleNoConfig"
5329
5366
  },
@@ -8634,6 +8671,26 @@
8634
8671
  }
8635
8672
  ]
8636
8673
  },
8674
+ "unicorn/explicit-timer-delay": {
8675
+ "anyOf": [
8676
+ {
8677
+ "$ref": "#/definitions/RuleNoConfig"
8678
+ },
8679
+ {
8680
+ "type": "array",
8681
+ "items": [
8682
+ {
8683
+ "$ref": "#/definitions/AllowWarnDeny"
8684
+ },
8685
+ {
8686
+ "$ref": "#/definitions/ExplicitTimerDelayMode"
8687
+ }
8688
+ ],
8689
+ "maxItems": 2,
8690
+ "minItems": 2
8691
+ }
8692
+ ]
8693
+ },
8637
8694
  "unicorn/filename-case": {
8638
8695
  "$ref": "#/definitions/DummyRule"
8639
8696
  },
@@ -8767,6 +8824,9 @@
8767
8824
  "unicorn/no-await-in-promise-methods": {
8768
8825
  "$ref": "#/definitions/RuleNoConfig"
8769
8826
  },
8827
+ "unicorn/no-confusing-array-with": {
8828
+ "$ref": "#/definitions/RuleNoConfig"
8829
+ },
8770
8830
  "unicorn/no-console-spaces": {
8771
8831
  "$ref": "#/definitions/RuleNoConfig"
8772
8832
  },
@@ -10698,6 +10758,26 @@
10698
10758
  },
10699
10759
  "additionalProperties": false
10700
10760
  },
10761
+ "ExplicitTimerDelayMode": {
10762
+ "oneOf": [
10763
+ {
10764
+ "description": "Require explicit `delay` argument for clarity.",
10765
+ "type": "string",
10766
+ "enum": [
10767
+ "always"
10768
+ ],
10769
+ "markdownDescription": "Require explicit `delay` argument for clarity."
10770
+ },
10771
+ {
10772
+ "description": "Disallow explicit `0` delay, prefer implicit default.",
10773
+ "type": "string",
10774
+ "enum": [
10775
+ "never"
10776
+ ],
10777
+ "markdownDescription": "Disallow explicit `0` delay, prefer implicit default."
10778
+ }
10779
+ ]
10780
+ },
10701
10781
  "ExtensionRule": {
10702
10782
  "description": "Extension rule configuration; Copy to avoid extra indirection.",
10703
10783
  "type": "string",
@@ -10819,12 +10899,12 @@
10819
10899
  "type": "object",
10820
10900
  "properties": {
10821
10901
  "forbid": {
10822
- "description": "An array of prop names or objects that are forbidden on DOM elements.\n\nEach array element can be a string with the property name, or an object\nwith `propName`, an optional `disallowedFor` array of DOM node names,\nand an optional custom `message`.\n\nExamples:\n\n- `[\"error\", { \"forbid\": [\"id\", \"style\"] }]`\n- `[\"error\", { \"forbid\": [{ \"propName\": \"className\", \"message\": \"Use class instead\" }] }]`\n- `[\"error\", { \"forbid\": [{ \"propName\": \"style\", \"disallowedFor\": [\"div\", \"span\"] }] }]`",
10902
+ "description": "An array of prop names or objects that are forbidden on DOM elements.\n\nEach array element can be a string with the property name, or an object\nwith `propName`, optional `disallowedFor` and `disallowedValues` arrays,\nand an optional custom `message`.\n\nExamples:\n\n- `[\"error\", { \"forbid\": [\"id\", \"style\"] }]`\n- `[\"error\", { \"forbid\": [{ \"propName\": \"className\", \"message\": \"Use class instead\" }] }]`\n- `[\"error\", { \"forbid\": [{ \"propName\": \"style\", \"disallowedFor\": [\"div\", \"span\"] }] }]`\n- `[\"error\", { \"forbid\": [{ \"propName\": \"type\", \"disallowedValues\": [\"button\"] }] }]`",
10823
10903
  "type": "array",
10824
10904
  "items": {
10825
10905
  "$ref": "#/definitions/ForbidDomPropsItem"
10826
10906
  },
10827
- "markdownDescription": "An array of prop names or objects that are forbidden on DOM elements.\n\nEach array element can be a string with the property name, or an object\nwith `propName`, an optional `disallowedFor` array of DOM node names,\nand an optional custom `message`.\n\nExamples:\n\n- `[\"error\", { \"forbid\": [\"id\", \"style\"] }]`\n- `[\"error\", { \"forbid\": [{ \"propName\": \"className\", \"message\": \"Use class instead\" }] }]`\n- `[\"error\", { \"forbid\": [{ \"propName\": \"style\", \"disallowedFor\": [\"div\", \"span\"] }] }]`"
10907
+ "markdownDescription": "An array of prop names or objects that are forbidden on DOM elements.\n\nEach array element can be a string with the property name, or an object\nwith `propName`, optional `disallowedFor` and `disallowedValues` arrays,\nand an optional custom `message`.\n\nExamples:\n\n- `[\"error\", { \"forbid\": [\"id\", \"style\"] }]`\n- `[\"error\", { \"forbid\": [{ \"propName\": \"className\", \"message\": \"Use class instead\" }] }]`\n- `[\"error\", { \"forbid\": [{ \"propName\": \"style\", \"disallowedFor\": [\"div\", \"span\"] }] }]`\n- `[\"error\", { \"forbid\": [{ \"propName\": \"type\", \"disallowedValues\": [\"button\"] }] }]`"
10828
10908
  }
10829
10909
  },
10830
10910
  "additionalProperties": false,
@@ -10839,13 +10919,13 @@
10839
10919
  "markdownDescription": "A prop name to forbid on all DOM elements."
10840
10920
  },
10841
10921
  {
10842
- "description": "A prop with optional `disallowedFor` DOM node list and custom `message`.",
10922
+ "description": "A prop with optional `disallowedFor` DOM node list, optional\n`disallowedValues` value list, and custom `message`.",
10843
10923
  "allOf": [
10844
10924
  {
10845
10925
  "$ref": "#/definitions/PropWithOptions"
10846
10926
  }
10847
10927
  ],
10848
- "markdownDescription": "A prop with optional `disallowedFor` DOM node list and custom `message`."
10928
+ "markdownDescription": "A prop with optional `disallowedFor` DOM node list, optional\n`disallowedValues` value list, and custom `message`."
10849
10929
  }
10850
10930
  ],
10851
10931
  "markdownDescription": "A forbidden prop, either as a plain prop name string or with options."
@@ -10914,15 +10994,10 @@
10914
10994
  },
10915
10995
  "ForbidItemObject": {
10916
10996
  "type": "object",
10917
- "required": [
10918
- "allowedFor",
10919
- "allowedForPatterns",
10920
- "disallowedFor",
10921
- "disallowedForPatterns"
10922
- ],
10923
10997
  "properties": {
10924
10998
  "allowedFor": {
10925
10999
  "description": "Component names for which this prop is **allowed** (all others are\nforbidden).",
11000
+ "default": [],
10926
11001
  "type": "array",
10927
11002
  "items": {
10928
11003
  "type": "string"
@@ -10931,6 +11006,7 @@
10931
11006
  },
10932
11007
  "allowedForPatterns": {
10933
11008
  "description": "Glob patterns for component names where the prop is **allowed**.",
11009
+ "default": [],
10934
11010
  "type": "array",
10935
11011
  "items": {
10936
11012
  "type": "string"
@@ -10939,6 +11015,7 @@
10939
11015
  },
10940
11016
  "disallowedFor": {
10941
11017
  "description": "Component names for which this prop is **disallowed** (all others are\nallowed).",
11018
+ "default": [],
10942
11019
  "type": "array",
10943
11020
  "items": {
10944
11021
  "type": "string"
@@ -10947,6 +11024,7 @@
10947
11024
  },
10948
11025
  "disallowedForPatterns": {
10949
11026
  "description": "Glob patterns for component names where the prop is **disallowed**.",
11027
+ "default": [],
10950
11028
  "type": "array",
10951
11029
  "items": {
10952
11030
  "type": "string"
@@ -12375,6 +12453,16 @@
12375
12453
  },
12376
12454
  "additionalProperties": false
12377
12455
  },
12456
+ "LoopType": {
12457
+ "type": "string",
12458
+ "enum": [
12459
+ "WhileStatement",
12460
+ "DoWhileStatement",
12461
+ "ForStatement",
12462
+ "ForInStatement",
12463
+ "ForOfStatement"
12464
+ ]
12465
+ },
12378
12466
  "MaxClassesPerFileConfig": {
12379
12467
  "type": "object",
12380
12468
  "properties": {
@@ -13187,6 +13275,12 @@
13187
13275
  "NoArraySort": {
13188
13276
  "type": "object",
13189
13277
  "properties": {
13278
+ "allowAfterSpread": {
13279
+ "description": "When set to `true`, allows sorting a fresh array created by a spread, e.g. `[...iterable].sort()`.\nThis avoids the double allocation of `toSorted()` when sorting an iterable such as a `Set`.\n\nExample of **correct** code for this rule with `allowAfterSpread` set to `true`:\n```js\nconst sorted = [...mySet].sort();\n```",
13280
+ "default": false,
13281
+ "type": "boolean",
13282
+ "markdownDescription": "When set to `true`, allows sorting a fresh array created by a spread, e.g. `[...iterable].sort()`.\nThis avoids the double allocation of `toSorted()` when sorting an iterable such as a `Set`.\n\nExample of **correct** code for this rule with `allowAfterSpread` set to `true`:\n```js\nconst sorted = [...mySet].sort();\n```"
13283
+ },
13190
13284
  "allowExpressionStatement": {
13191
13285
  "description": "When set to `true` (default), allows `array.sort()` as an expression statement.\nSet to `false` to forbid `Array#sort()` even if it's an expression statement.\n\nExample of **incorrect** code for this rule with `allowExpressionStatement` set to `false`:\n```js\narray.sort();\n```",
13192
13286
  "default": true,
@@ -13407,6 +13501,16 @@
13407
13501
  },
13408
13502
  "additionalProperties": false
13409
13503
  },
13504
+ "NoConstantBinaryExpressionConfig": {
13505
+ "type": "object",
13506
+ "properties": {
13507
+ "checkRelationalComparisons": {
13508
+ "default": true,
13509
+ "type": "boolean"
13510
+ }
13511
+ },
13512
+ "additionalProperties": false
13513
+ },
13410
13514
  "NoConstantCondition": {
13411
13515
  "type": "object",
13412
13516
  "properties": {
@@ -15332,6 +15436,21 @@
15332
15436
  },
15333
15437
  "additionalProperties": false
15334
15438
  },
15439
+ "NoUnreachableLoop": {
15440
+ "$ref": "#/definitions/NoUnreachableLoopConfig"
15441
+ },
15442
+ "NoUnreachableLoopConfig": {
15443
+ "type": "object",
15444
+ "properties": {
15445
+ "ignore": {
15446
+ "type": "array",
15447
+ "items": {
15448
+ "$ref": "#/definitions/LoopType"
15449
+ }
15450
+ }
15451
+ },
15452
+ "additionalProperties": false
15453
+ },
15335
15454
  "NoUnsafeConfig": {
15336
15455
  "type": "object",
15337
15456
  "properties": {
@@ -16824,15 +16943,12 @@
16824
16943
  "markdownDescription": "An array of function names that should also be treated as test blocks."
16825
16944
  },
16826
16945
  "assertFunctionNames": {
16827
- "description": "A list of function names that should be treated as assertion functions.",
16828
- "default": [
16829
- "expect"
16830
- ],
16946
+ "description": "A list of function names that should be treated as assertion functions.\nDefault: `[\"expect\"]`",
16831
16947
  "type": "array",
16832
16948
  "items": {
16833
16949
  "type": "string"
16834
16950
  },
16835
- "markdownDescription": "A list of function names that should be treated as assertion functions."
16951
+ "markdownDescription": "A list of function names that should be treated as assertion functions.\nDefault: `[\"expect\"]`"
16836
16952
  }
16837
16953
  },
16838
16954
  "additionalProperties": false
@@ -17321,7 +17437,7 @@
17321
17437
  "additionalProperties": false
17322
17438
  },
17323
17439
  "PropWithOptions": {
17324
- "description": "A prop with optional `disallowedFor` DOM node list and custom `message`.",
17440
+ "description": "A prop with optional `disallowedFor` DOM node list, optional `disallowedValues`\nvalue list, and custom `message`.",
17325
17441
  "type": "object",
17326
17442
  "required": [
17327
17443
  "propName"
@@ -17335,6 +17451,14 @@
17335
17451
  },
17336
17452
  "markdownDescription": "A list of DOM element names (e.g. `[\"div\", \"span\"]`) on which this\nprop is forbidden. If empty or omitted, the prop is forbidden on all\nDOM elements."
17337
17453
  },
17454
+ "disallowedValues": {
17455
+ "description": "A list of string literal values for which this prop is forbidden. If\nomitted, the prop is forbidden for all values.",
17456
+ "type": "array",
17457
+ "items": {
17458
+ "type": "string"
17459
+ },
17460
+ "markdownDescription": "A list of string literal values for which this prop is forbidden. If\nomitted, the prop is forbidden for all values."
17461
+ },
17338
17462
  "message": {
17339
17463
  "description": "A custom message to display when this prop is used.",
17340
17464
  "type": "string",
@@ -17347,7 +17471,7 @@
17347
17471
  }
17348
17472
  },
17349
17473
  "additionalProperties": false,
17350
- "markdownDescription": "A prop with optional `disallowedFor` DOM node list and custom `message`."
17474
+ "markdownDescription": "A prop with optional `disallowedFor` DOM node list, optional `disallowedValues`\nvalue list, and custom `message`."
17351
17475
  },
17352
17476
  "PropertyDetails": {
17353
17477
  "type": "object",
package/dist/bindings.js CHANGED
@@ -37,7 +37,7 @@ function requireNative() {
37
37
  }
38
38
  try {
39
39
  let binding = require("@oxlint/binding-android-arm64"), bindingPackageVersion = require("@oxlint/binding-android-arm64/package.json").version;
40
- if (bindingPackageVersion !== "1.72.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw Error(`Native binding package version mismatch, expected 1.72.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
40
+ if (bindingPackageVersion !== "1.73.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw Error(`Native binding package version mismatch, expected 1.73.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
41
41
  return binding;
42
42
  } catch (e) {
43
43
  loadErrors.push(e);
@@ -50,7 +50,7 @@ function requireNative() {
50
50
  }
51
51
  try {
52
52
  let binding = require("@oxlint/binding-android-arm-eabi"), bindingPackageVersion = require("@oxlint/binding-android-arm-eabi/package.json").version;
53
- if (bindingPackageVersion !== "1.72.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw Error(`Native binding package version mismatch, expected 1.72.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
53
+ if (bindingPackageVersion !== "1.73.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw Error(`Native binding package version mismatch, expected 1.73.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
54
54
  return binding;
55
55
  } catch (e) {
56
56
  loadErrors.push(e);
@@ -64,7 +64,7 @@ function requireNative() {
64
64
  }
65
65
  try {
66
66
  let binding = require("@oxlint/binding-win32-x64-gnu"), bindingPackageVersion = require("@oxlint/binding-win32-x64-gnu/package.json").version;
67
- if (bindingPackageVersion !== "1.72.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw Error(`Native binding package version mismatch, expected 1.72.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
67
+ if (bindingPackageVersion !== "1.73.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw Error(`Native binding package version mismatch, expected 1.73.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
68
68
  return binding;
69
69
  } catch (e) {
70
70
  loadErrors.push(e);
@@ -77,7 +77,7 @@ function requireNative() {
77
77
  }
78
78
  try {
79
79
  let binding = require("@oxlint/binding-win32-x64-msvc"), bindingPackageVersion = require("@oxlint/binding-win32-x64-msvc/package.json").version;
80
- if (bindingPackageVersion !== "1.72.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw Error(`Native binding package version mismatch, expected 1.72.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
80
+ if (bindingPackageVersion !== "1.73.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw Error(`Native binding package version mismatch, expected 1.73.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
81
81
  return binding;
82
82
  } catch (e) {
83
83
  loadErrors.push(e);
@@ -91,7 +91,7 @@ function requireNative() {
91
91
  }
92
92
  try {
93
93
  let binding = require("@oxlint/binding-win32-ia32-msvc"), bindingPackageVersion = require("@oxlint/binding-win32-ia32-msvc/package.json").version;
94
- if (bindingPackageVersion !== "1.72.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw Error(`Native binding package version mismatch, expected 1.72.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
94
+ if (bindingPackageVersion !== "1.73.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw Error(`Native binding package version mismatch, expected 1.73.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
95
95
  return binding;
96
96
  } catch (e) {
97
97
  loadErrors.push(e);
@@ -104,7 +104,7 @@ function requireNative() {
104
104
  }
105
105
  try {
106
106
  let binding = require("@oxlint/binding-win32-arm64-msvc"), bindingPackageVersion = require("@oxlint/binding-win32-arm64-msvc/package.json").version;
107
- if (bindingPackageVersion !== "1.72.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw Error(`Native binding package version mismatch, expected 1.72.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
107
+ if (bindingPackageVersion !== "1.73.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw Error(`Native binding package version mismatch, expected 1.73.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
108
108
  return binding;
109
109
  } catch (e) {
110
110
  loadErrors.push(e);
@@ -118,7 +118,7 @@ function requireNative() {
118
118
  }
119
119
  try {
120
120
  let binding = require("@oxlint/binding-darwin-universal"), bindingPackageVersion = require("@oxlint/binding-darwin-universal/package.json").version;
121
- if (bindingPackageVersion !== "1.72.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw Error(`Native binding package version mismatch, expected 1.72.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
121
+ if (bindingPackageVersion !== "1.73.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw Error(`Native binding package version mismatch, expected 1.73.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
122
122
  return binding;
123
123
  } catch (e) {
124
124
  loadErrors.push(e);
@@ -131,7 +131,7 @@ function requireNative() {
131
131
  }
132
132
  try {
133
133
  let binding = require("@oxlint/binding-darwin-x64"), bindingPackageVersion = require("@oxlint/binding-darwin-x64/package.json").version;
134
- if (bindingPackageVersion !== "1.72.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw Error(`Native binding package version mismatch, expected 1.72.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
134
+ if (bindingPackageVersion !== "1.73.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw Error(`Native binding package version mismatch, expected 1.73.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
135
135
  return binding;
136
136
  } catch (e) {
137
137
  loadErrors.push(e);
@@ -144,7 +144,7 @@ function requireNative() {
144
144
  }
145
145
  try {
146
146
  let binding = require("@oxlint/binding-darwin-arm64"), bindingPackageVersion = require("@oxlint/binding-darwin-arm64/package.json").version;
147
- if (bindingPackageVersion !== "1.72.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw Error(`Native binding package version mismatch, expected 1.72.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
147
+ if (bindingPackageVersion !== "1.73.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw Error(`Native binding package version mismatch, expected 1.73.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
148
148
  return binding;
149
149
  } catch (e) {
150
150
  loadErrors.push(e);
@@ -158,7 +158,7 @@ function requireNative() {
158
158
  }
159
159
  try {
160
160
  let binding = require("@oxlint/binding-freebsd-x64"), bindingPackageVersion = require("@oxlint/binding-freebsd-x64/package.json").version;
161
- if (bindingPackageVersion !== "1.72.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw Error(`Native binding package version mismatch, expected 1.72.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
161
+ if (bindingPackageVersion !== "1.73.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw Error(`Native binding package version mismatch, expected 1.73.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
162
162
  return binding;
163
163
  } catch (e) {
164
164
  loadErrors.push(e);
@@ -171,7 +171,7 @@ function requireNative() {
171
171
  }
172
172
  try {
173
173
  let binding = require("@oxlint/binding-freebsd-arm64"), bindingPackageVersion = require("@oxlint/binding-freebsd-arm64/package.json").version;
174
- if (bindingPackageVersion !== "1.72.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw Error(`Native binding package version mismatch, expected 1.72.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
174
+ if (bindingPackageVersion !== "1.73.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw Error(`Native binding package version mismatch, expected 1.73.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
175
175
  return binding;
176
176
  } catch (e) {
177
177
  loadErrors.push(e);
@@ -185,7 +185,7 @@ function requireNative() {
185
185
  }
186
186
  try {
187
187
  let binding = require("@oxlint/binding-linux-x64-musl"), bindingPackageVersion = require("@oxlint/binding-linux-x64-musl/package.json").version;
188
- if (bindingPackageVersion !== "1.72.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw Error(`Native binding package version mismatch, expected 1.72.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
188
+ if (bindingPackageVersion !== "1.73.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw Error(`Native binding package version mismatch, expected 1.73.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
189
189
  return binding;
190
190
  } catch (e) {
191
191
  loadErrors.push(e);
@@ -198,7 +198,7 @@ function requireNative() {
198
198
  }
199
199
  try {
200
200
  let binding = require("@oxlint/binding-linux-x64-gnu"), bindingPackageVersion = require("@oxlint/binding-linux-x64-gnu/package.json").version;
201
- if (bindingPackageVersion !== "1.72.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw Error(`Native binding package version mismatch, expected 1.72.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
201
+ if (bindingPackageVersion !== "1.73.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw Error(`Native binding package version mismatch, expected 1.73.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
202
202
  return binding;
203
203
  } catch (e) {
204
204
  loadErrors.push(e);
@@ -212,7 +212,7 @@ function requireNative() {
212
212
  }
213
213
  try {
214
214
  let binding = require("@oxlint/binding-linux-arm64-musl"), bindingPackageVersion = require("@oxlint/binding-linux-arm64-musl/package.json").version;
215
- if (bindingPackageVersion !== "1.72.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw Error(`Native binding package version mismatch, expected 1.72.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
215
+ if (bindingPackageVersion !== "1.73.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw Error(`Native binding package version mismatch, expected 1.73.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
216
216
  return binding;
217
217
  } catch (e) {
218
218
  loadErrors.push(e);
@@ -225,7 +225,7 @@ function requireNative() {
225
225
  }
226
226
  try {
227
227
  let binding = require("@oxlint/binding-linux-arm64-gnu"), bindingPackageVersion = require("@oxlint/binding-linux-arm64-gnu/package.json").version;
228
- if (bindingPackageVersion !== "1.72.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw Error(`Native binding package version mismatch, expected 1.72.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
228
+ if (bindingPackageVersion !== "1.73.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw Error(`Native binding package version mismatch, expected 1.73.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
229
229
  return binding;
230
230
  } catch (e) {
231
231
  loadErrors.push(e);
@@ -239,7 +239,7 @@ function requireNative() {
239
239
  }
240
240
  try {
241
241
  let binding = require("@oxlint/binding-linux-arm-musleabihf"), bindingPackageVersion = require("@oxlint/binding-linux-arm-musleabihf/package.json").version;
242
- if (bindingPackageVersion !== "1.72.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw Error(`Native binding package version mismatch, expected 1.72.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
242
+ if (bindingPackageVersion !== "1.73.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw Error(`Native binding package version mismatch, expected 1.73.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
243
243
  return binding;
244
244
  } catch (e) {
245
245
  loadErrors.push(e);
@@ -252,7 +252,7 @@ function requireNative() {
252
252
  }
253
253
  try {
254
254
  let binding = require("@oxlint/binding-linux-arm-gnueabihf"), bindingPackageVersion = require("@oxlint/binding-linux-arm-gnueabihf/package.json").version;
255
- if (bindingPackageVersion !== "1.72.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw Error(`Native binding package version mismatch, expected 1.72.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
255
+ if (bindingPackageVersion !== "1.73.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw Error(`Native binding package version mismatch, expected 1.73.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
256
256
  return binding;
257
257
  } catch (e) {
258
258
  loadErrors.push(e);
@@ -266,7 +266,7 @@ function requireNative() {
266
266
  }
267
267
  try {
268
268
  let binding = require("@oxlint/binding-linux-loong64-musl"), bindingPackageVersion = require("@oxlint/binding-linux-loong64-musl/package.json").version;
269
- if (bindingPackageVersion !== "1.72.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw Error(`Native binding package version mismatch, expected 1.72.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
269
+ if (bindingPackageVersion !== "1.73.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw Error(`Native binding package version mismatch, expected 1.73.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
270
270
  return binding;
271
271
  } catch (e) {
272
272
  loadErrors.push(e);
@@ -279,7 +279,7 @@ function requireNative() {
279
279
  }
280
280
  try {
281
281
  let binding = require("@oxlint/binding-linux-loong64-gnu"), bindingPackageVersion = require("@oxlint/binding-linux-loong64-gnu/package.json").version;
282
- if (bindingPackageVersion !== "1.72.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw Error(`Native binding package version mismatch, expected 1.72.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
282
+ if (bindingPackageVersion !== "1.73.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw Error(`Native binding package version mismatch, expected 1.73.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
283
283
  return binding;
284
284
  } catch (e) {
285
285
  loadErrors.push(e);
@@ -293,7 +293,7 @@ function requireNative() {
293
293
  }
294
294
  try {
295
295
  let binding = require("@oxlint/binding-linux-riscv64-musl"), bindingPackageVersion = require("@oxlint/binding-linux-riscv64-musl/package.json").version;
296
- if (bindingPackageVersion !== "1.72.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw Error(`Native binding package version mismatch, expected 1.72.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
296
+ if (bindingPackageVersion !== "1.73.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw Error(`Native binding package version mismatch, expected 1.73.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
297
297
  return binding;
298
298
  } catch (e) {
299
299
  loadErrors.push(e);
@@ -306,7 +306,7 @@ function requireNative() {
306
306
  }
307
307
  try {
308
308
  let binding = require("@oxlint/binding-linux-riscv64-gnu"), bindingPackageVersion = require("@oxlint/binding-linux-riscv64-gnu/package.json").version;
309
- if (bindingPackageVersion !== "1.72.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw Error(`Native binding package version mismatch, expected 1.72.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
309
+ if (bindingPackageVersion !== "1.73.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw Error(`Native binding package version mismatch, expected 1.73.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
310
310
  return binding;
311
311
  } catch (e) {
312
312
  loadErrors.push(e);
@@ -320,7 +320,7 @@ function requireNative() {
320
320
  }
321
321
  try {
322
322
  let binding = require("@oxlint/binding-linux-ppc64-gnu"), bindingPackageVersion = require("@oxlint/binding-linux-ppc64-gnu/package.json").version;
323
- if (bindingPackageVersion !== "1.72.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw Error(`Native binding package version mismatch, expected 1.72.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
323
+ if (bindingPackageVersion !== "1.73.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw Error(`Native binding package version mismatch, expected 1.73.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
324
324
  return binding;
325
325
  } catch (e) {
326
326
  loadErrors.push(e);
@@ -333,7 +333,7 @@ function requireNative() {
333
333
  }
334
334
  try {
335
335
  let binding = require("@oxlint/binding-linux-s390x-gnu"), bindingPackageVersion = require("@oxlint/binding-linux-s390x-gnu/package.json").version;
336
- if (bindingPackageVersion !== "1.72.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw Error(`Native binding package version mismatch, expected 1.72.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
336
+ if (bindingPackageVersion !== "1.73.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw Error(`Native binding package version mismatch, expected 1.73.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
337
337
  return binding;
338
338
  } catch (e) {
339
339
  loadErrors.push(e);
@@ -347,7 +347,7 @@ function requireNative() {
347
347
  }
348
348
  try {
349
349
  let binding = require("@oxlint/binding-openharmony-arm64"), bindingPackageVersion = require("@oxlint/binding-openharmony-arm64/package.json").version;
350
- if (bindingPackageVersion !== "1.72.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw Error(`Native binding package version mismatch, expected 1.72.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
350
+ if (bindingPackageVersion !== "1.73.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw Error(`Native binding package version mismatch, expected 1.73.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
351
351
  return binding;
352
352
  } catch (e) {
353
353
  loadErrors.push(e);
@@ -360,7 +360,7 @@ function requireNative() {
360
360
  }
361
361
  try {
362
362
  let binding = require("@oxlint/binding-openharmony-x64"), bindingPackageVersion = require("@oxlint/binding-openharmony-x64/package.json").version;
363
- if (bindingPackageVersion !== "1.72.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw Error(`Native binding package version mismatch, expected 1.72.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
363
+ if (bindingPackageVersion !== "1.73.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw Error(`Native binding package version mismatch, expected 1.73.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
364
364
  return binding;
365
365
  } catch (e) {
366
366
  loadErrors.push(e);
@@ -373,7 +373,7 @@ function requireNative() {
373
373
  }
374
374
  try {
375
375
  let binding = require("@oxlint/binding-openharmony-arm"), bindingPackageVersion = require("@oxlint/binding-openharmony-arm/package.json").version;
376
- if (bindingPackageVersion !== "1.72.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw Error(`Native binding package version mismatch, expected 1.72.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
376
+ if (bindingPackageVersion !== "1.73.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw Error(`Native binding package version mismatch, expected 1.73.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
377
377
  return binding;
378
378
  } catch (e) {
379
379
  loadErrors.push(e);
package/dist/index.d.ts CHANGED
@@ -123,6 +123,7 @@ type NoReturnAssignMode = "always" | "except-parens";
123
123
  * Controls how hoisting is handled when checking for shadowing.
124
124
  */
125
125
  type HoistOption = "all" | "functions" | "functions-and-types" | "never" | "types";
126
+ type LoopType = "WhileStatement" | "DoWhileStatement" | "ForStatement" | "ForInStatement" | "ForOfStatement";
126
127
  type NoUnusedVarsConfig = VarsOption | NoUnusedVarsOptions;
127
128
  type VarsOption = "all" | "local";
128
129
  type ArgsOption = "after-used" | "all" | "none";
@@ -295,6 +296,7 @@ type PathOption = "always" | "never";
295
296
  type TypesOption = "always" | "never" | "prefer-import";
296
297
  type BomOptionType = "always" | "never";
297
298
  type NonZero = "greater-than" | "not-equal";
299
+ type ExplicitTimerDelayMode = "always" | "never";
298
300
  type ModuleStylesOverride = (false | {
299
301
  /**
300
302
  * Whether default imports or whole-module `require()` assignments are allowed for this module.
@@ -1015,7 +1017,7 @@ interface DummyRuleMap {
1015
1017
  "no-cond-assign"?: RuleNoConfig | [AllowWarnDeny, NoCondAssignConfig];
1016
1018
  "no-console"?: RuleNoConfig | [AllowWarnDeny, NoConsoleConfig];
1017
1019
  "no-const-assign"?: RuleNoConfig;
1018
- "no-constant-binary-expression"?: RuleNoConfig;
1020
+ "no-constant-binary-expression"?: RuleNoConfig | [AllowWarnDeny, NoConstantBinaryExpressionConfig];
1019
1021
  "no-constant-condition"?: RuleNoConfig | [AllowWarnDeny, NoConstantCondition];
1020
1022
  "no-constructor-return"?: RuleNoConfig;
1021
1023
  "no-continue"?: RuleNoConfig;
@@ -1104,6 +1106,7 @@ interface DummyRuleMap {
1104
1106
  "no-unmodified-loop-condition"?: RuleNoConfig;
1105
1107
  "no-unneeded-ternary"?: RuleNoConfig | [AllowWarnDeny, NoUnneededTernary];
1106
1108
  "no-unreachable"?: RuleNoConfig;
1109
+ "no-unreachable-loop"?: RuleNoConfig | [AllowWarnDeny, NoUnreachableLoopConfig];
1107
1110
  "no-unsafe-finally"?: RuleNoConfig;
1108
1111
  "no-unsafe-negation"?: RuleNoConfig | [AllowWarnDeny, NoUnsafeNegation];
1109
1112
  "no-unsafe-optional-chaining"?: RuleNoConfig | [AllowWarnDeny, NoUnsafeOptionalChaining];
@@ -1391,6 +1394,7 @@ interface DummyRuleMap {
1391
1394
  "unicorn/error-message"?: RuleNoConfig;
1392
1395
  "unicorn/escape-case"?: RuleNoConfig;
1393
1396
  "unicorn/explicit-length-check"?: RuleNoConfig | [AllowWarnDeny, ExplicitLengthCheck];
1397
+ "unicorn/explicit-timer-delay"?: RuleNoConfig | [AllowWarnDeny, ExplicitTimerDelayMode];
1394
1398
  "unicorn/filename-case"?: DummyRule;
1395
1399
  "unicorn/import-style"?: RuleNoConfig | [AllowWarnDeny, ImportStyleConfig];
1396
1400
  "unicorn/max-nested-calls"?: RuleNoConfig | [AllowWarnDeny, MaxNestedCalls];
@@ -1407,6 +1411,7 @@ interface DummyRuleMap {
1407
1411
  "unicorn/no-array-sort"?: RuleNoConfig | [AllowWarnDeny, NoArraySort];
1408
1412
  "unicorn/no-await-expression-member"?: RuleNoConfig;
1409
1413
  "unicorn/no-await-in-promise-methods"?: RuleNoConfig;
1414
+ "unicorn/no-confusing-array-with"?: RuleNoConfig;
1410
1415
  "unicorn/no-console-spaces"?: RuleNoConfig;
1411
1416
  "unicorn/no-document-cookie"?: RuleNoConfig;
1412
1417
  "unicorn/no-empty-file"?: RuleNoConfig;
@@ -2268,6 +2273,7 @@ interface PreferEndingWithAnExpectConfig {
2268
2273
  additionalTestBlockFunctions?: string[];
2269
2274
  /**
2270
2275
  * A list of function names that should be treated as assertion functions.
2276
+ * Default: `["expect"]`
2271
2277
  */
2272
2278
  assertFunctionNames?: string[];
2273
2279
  }
@@ -2792,6 +2798,9 @@ interface NoConsoleConfig {
2792
2798
  */
2793
2799
  allow?: string[];
2794
2800
  }
2801
+ interface NoConstantBinaryExpressionConfig {
2802
+ checkRelationalComparisons?: boolean;
2803
+ }
2795
2804
  interface NoConstantCondition {
2796
2805
  /**
2797
2806
  * Configuration option to specify whether to check for constant conditions in loops.
@@ -3468,6 +3477,9 @@ interface NoUnneededTernary {
3468
3477
  */
3469
3478
  defaultAssignment?: boolean;
3470
3479
  }
3480
+ interface NoUnreachableLoopConfig {
3481
+ ignore?: LoopType[];
3482
+ }
3471
3483
  interface NoUnsafeNegation {
3472
3484
  /**
3473
3485
  * The `enforceForOrderingRelations` option determines whether negation is allowed
@@ -4252,20 +4264,20 @@ interface ForbidItemObject {
4252
4264
  * Component names for which this prop is **allowed** (all others are
4253
4265
  * forbidden).
4254
4266
  */
4255
- allowedFor: string[];
4267
+ allowedFor?: string[];
4256
4268
  /**
4257
4269
  * Glob patterns for component names where the prop is **allowed**.
4258
4270
  */
4259
- allowedForPatterns: string[];
4271
+ allowedForPatterns?: string[];
4260
4272
  /**
4261
4273
  * Component names for which this prop is **disallowed** (all others are
4262
4274
  * allowed).
4263
4275
  */
4264
- disallowedFor: string[];
4276
+ disallowedFor?: string[];
4265
4277
  /**
4266
4278
  * Glob patterns for component names where the prop is **disallowed**.
4267
4279
  */
4268
- disallowedForPatterns: string[];
4280
+ disallowedForPatterns?: string[];
4269
4281
  /**
4270
4282
  * Custom message to display.
4271
4283
  */
@@ -4287,7 +4299,7 @@ interface ForbidDomPropsConfig {
4287
4299
  * An array of prop names or objects that are forbidden on DOM elements.
4288
4300
  *
4289
4301
  * Each array element can be a string with the property name, or an object
4290
- * with `propName`, an optional `disallowedFor` array of DOM node names,
4302
+ * with `propName`, optional `disallowedFor` and `disallowedValues` arrays,
4291
4303
  * and an optional custom `message`.
4292
4304
  *
4293
4305
  * Examples:
@@ -4295,11 +4307,13 @@ interface ForbidDomPropsConfig {
4295
4307
  * - `["error", { "forbid": ["id", "style"] }]`
4296
4308
  * - `["error", { "forbid": [{ "propName": "className", "message": "Use class instead" }] }]`
4297
4309
  * - `["error", { "forbid": [{ "propName": "style", "disallowedFor": ["div", "span"] }] }]`
4310
+ * - `["error", { "forbid": [{ "propName": "type", "disallowedValues": ["button"] }] }]`
4298
4311
  */
4299
4312
  forbid?: ForbidDomPropsItem[];
4300
4313
  }
4301
4314
  /**
4302
- * A prop with optional `disallowedFor` DOM node list and custom `message`.
4315
+ * A prop with optional `disallowedFor` DOM node list, optional `disallowedValues`
4316
+ * value list, and custom `message`.
4303
4317
  */
4304
4318
  interface PropWithOptions {
4305
4319
  /**
@@ -4308,6 +4322,11 @@ interface PropWithOptions {
4308
4322
  * DOM elements.
4309
4323
  */
4310
4324
  disallowedFor?: string[];
4325
+ /**
4326
+ * A list of string literal values for which this prop is forbidden. If
4327
+ * omitted, the prop is forbidden for all values.
4328
+ */
4329
+ disallowedValues?: string[];
4311
4330
  /**
4312
4331
  * A custom message to display when this prop is used.
4313
4332
  */
@@ -5959,6 +5978,16 @@ interface NoArrayReverse {
5959
5978
  allowExpressionStatement?: boolean;
5960
5979
  }
5961
5980
  interface NoArraySort {
5981
+ /**
5982
+ * When set to `true`, allows sorting a fresh array created by a spread, e.g. `[...iterable].sort()`.
5983
+ * This avoids the double allocation of `toSorted()` when sorting an iterable such as a `Set`.
5984
+ *
5985
+ * Example of **correct** code for this rule with `allowAfterSpread` set to `true`:
5986
+ * ```js
5987
+ * const sorted = [...mySet].sort();
5988
+ * ```
5989
+ */
5990
+ allowAfterSpread?: boolean;
5962
5991
  /**
5963
5992
  * When set to `true` (default), allows `array.sort()` as an expression statement.
5964
5993
  * Set to `false` to forbid `Array#sort()` even if it's an expression statement.
package/dist/lint.js CHANGED
@@ -14109,7 +14109,7 @@ function resetSettings() {
14109
14109
  }
14110
14110
  //#endregion
14111
14111
  //#region package.json
14112
- var version = "1.72.0";
14112
+ var version = "1.73.0";
14113
14113
  //#endregion
14114
14114
  //#region src-js/plugins/context.ts
14115
14115
  const ObjectFreeze$1 = Object.freeze, ObjectCreate = Object.create, ObjectAssign = Object.assign, ObjectPreventExtensions = Object.preventExtensions;
@@ -17243,8 +17243,8 @@ var require_uri_all = /* @__PURE__ */ __commonJSMin(((exports, module) => {
17243
17243
  }
17244
17244
  }
17245
17245
  function noop() {}
17246
- })))(), 1), id = "http://json-schema.org/draft-04/schema#", json_schema_draft_04_default = {
17247
- id,
17246
+ })))(), 1), json_schema_draft_04_default = {
17247
+ id: "http://json-schema.org/draft-04/schema#",
17248
17248
  $schema: "http://json-schema.org/draft-04/schema#",
17249
17249
  description: "Core schema meta-schema",
17250
17250
  definitions: {
@@ -17391,7 +17391,7 @@ const AJV = new import_ajv.default({
17391
17391
  verbose: !0,
17392
17392
  schemaId: "auto"
17393
17393
  });
17394
- AJV.addMetaSchema(json_schema_draft_04_default), AJV._opts.defaultMeta = id;
17394
+ AJV.addMetaSchema(json_schema_draft_04_default), AJV._opts.defaultMeta = json_schema_draft_04_default.id;
17395
17395
  /**
17396
17396
  * Compile a rule's schema into a validator function.
17397
17397
  *
@@ -17557,8 +17557,8 @@ const neverRunBeforeHook = () => !1;
17557
17557
  */
17558
17558
  async function loadPlugin(url, pluginName, pluginNameIsAlias, workspaceUri) {
17559
17559
  try {
17560
- let plugin = (await import(url)).default;
17561
- return JSONStringify$1({ Success: registerPlugin(plugin, pluginName, pluginNameIsAlias, workspaceUri) });
17560
+ let plugin = (await import(url)).default, res = registerPlugin(plugin, pluginName, pluginNameIsAlias, workspaceUri);
17561
+ return JSONStringify$1({ Success: res });
17562
17562
  } catch (err) {
17563
17563
  return JSONStringify$1({ Failure: getErrorMessage(err) });
17564
17564
  }
@@ -1367,7 +1367,7 @@ interface BindingIdentifier extends Span {
1367
1367
  decorators?: [];
1368
1368
  name: string;
1369
1369
  optional?: false;
1370
- typeAnnotation?: null;
1370
+ typeAnnotation?: TSTypeAnnotation | null;
1371
1371
  parent: Node;
1372
1372
  }
1373
1373
  interface LabelIdentifier extends Span {
@@ -1780,7 +1780,7 @@ interface ObjectPattern extends Span {
1780
1780
  decorators?: [];
1781
1781
  properties: Array<BindingProperty | BindingRestElement>;
1782
1782
  optional?: false;
1783
- typeAnnotation?: null;
1783
+ typeAnnotation?: TSTypeAnnotation | null;
1784
1784
  parent: Node;
1785
1785
  }
1786
1786
  interface BindingProperty extends Span {
@@ -1799,7 +1799,7 @@ interface ArrayPattern extends Span {
1799
1799
  decorators?: [];
1800
1800
  elements: Array<BindingPattern | BindingRestElement | null>;
1801
1801
  optional?: false;
1802
- typeAnnotation?: null;
1802
+ typeAnnotation?: TSTypeAnnotation | null;
1803
1803
  parent: Node;
1804
1804
  }
1805
1805
  interface BindingRestElement extends Span {
@@ -1807,7 +1807,7 @@ interface BindingRestElement extends Span {
1807
1807
  decorators?: [];
1808
1808
  argument: BindingPattern;
1809
1809
  optional?: false;
1810
- typeAnnotation?: null;
1810
+ typeAnnotation?: TSTypeAnnotation | null;
1811
1811
  value?: null;
1812
1812
  parent: Node;
1813
1813
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oxlint",
3
- "version": "1.72.0",
3
+ "version": "1.73.0",
4
4
  "description": "Linter for the JavaScript Oxidation Compiler",
5
5
  "keywords": [
6
6
  "eslint",
@@ -46,7 +46,7 @@
46
46
  "./package.json": "./package.json"
47
47
  },
48
48
  "peerDependencies": {
49
- "oxlint-tsgolint": ">=0.22.1",
49
+ "oxlint-tsgolint": ">=0.24.0",
50
50
  "vite-plus": "*"
51
51
  },
52
52
  "peerDependenciesMeta": {
@@ -87,24 +87,24 @@
87
87
  },
88
88
  "preferUnplugged": true,
89
89
  "optionalDependencies": {
90
- "@oxlint/binding-darwin-arm64": "1.72.0",
91
- "@oxlint/binding-android-arm64": "1.72.0",
92
- "@oxlint/binding-win32-arm64-msvc": "1.72.0",
93
- "@oxlint/binding-linux-arm64-gnu": "1.72.0",
94
- "@oxlint/binding-linux-arm64-musl": "1.72.0",
95
- "@oxlint/binding-openharmony-arm64": "1.72.0",
96
- "@oxlint/binding-android-arm-eabi": "1.72.0",
97
- "@oxlint/binding-linux-arm-gnueabihf": "1.72.0",
98
- "@oxlint/binding-linux-arm-musleabihf": "1.72.0",
99
- "@oxlint/binding-win32-ia32-msvc": "1.72.0",
100
- "@oxlint/binding-linux-ppc64-gnu": "1.72.0",
101
- "@oxlint/binding-linux-riscv64-gnu": "1.72.0",
102
- "@oxlint/binding-linux-riscv64-musl": "1.72.0",
103
- "@oxlint/binding-linux-s390x-gnu": "1.72.0",
104
- "@oxlint/binding-darwin-x64": "1.72.0",
105
- "@oxlint/binding-win32-x64-msvc": "1.72.0",
106
- "@oxlint/binding-freebsd-x64": "1.72.0",
107
- "@oxlint/binding-linux-x64-gnu": "1.72.0",
108
- "@oxlint/binding-linux-x64-musl": "1.72.0"
90
+ "@oxlint/binding-darwin-arm64": "1.73.0",
91
+ "@oxlint/binding-android-arm64": "1.73.0",
92
+ "@oxlint/binding-win32-arm64-msvc": "1.73.0",
93
+ "@oxlint/binding-linux-arm64-gnu": "1.73.0",
94
+ "@oxlint/binding-linux-arm64-musl": "1.73.0",
95
+ "@oxlint/binding-openharmony-arm64": "1.73.0",
96
+ "@oxlint/binding-android-arm-eabi": "1.73.0",
97
+ "@oxlint/binding-linux-arm-gnueabihf": "1.73.0",
98
+ "@oxlint/binding-linux-arm-musleabihf": "1.73.0",
99
+ "@oxlint/binding-win32-ia32-msvc": "1.73.0",
100
+ "@oxlint/binding-linux-ppc64-gnu": "1.73.0",
101
+ "@oxlint/binding-linux-riscv64-gnu": "1.73.0",
102
+ "@oxlint/binding-linux-riscv64-musl": "1.73.0",
103
+ "@oxlint/binding-linux-s390x-gnu": "1.73.0",
104
+ "@oxlint/binding-darwin-x64": "1.73.0",
105
+ "@oxlint/binding-win32-x64-msvc": "1.73.0",
106
+ "@oxlint/binding-freebsd-x64": "1.73.0",
107
+ "@oxlint/binding-linux-x64-gnu": "1.73.0",
108
+ "@oxlint/binding-linux-x64-musl": "1.73.0"
109
109
  }
110
110
  }