oxlint 1.60.0 → 1.62.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.
@@ -139,6 +139,9 @@
139
139
  },
140
140
  "vitest": {
141
141
  "typecheck": false
142
+ },
143
+ "jest": {
144
+ "version": null
142
145
  }
143
146
  },
144
147
  "allOf": [
@@ -376,6 +379,35 @@
376
379
  },
377
380
  "markdownDescription": "Configure JSX A11y plugin rules.\n\nSee\n[eslint-plugin-jsx-a11y](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y#configurations)'s\nconfiguration for a full reference."
378
381
  },
382
+ "JestPluginSettings": {
383
+ "description": "Configure Jest plugin rules.\n\nSee [eslint-plugin-jest](https://github.com/jest-community/eslint-plugin-jest)'s\nconfiguration for a full reference.",
384
+ "type": "object",
385
+ "properties": {
386
+ "version": {
387
+ "description": "Jest version — accepts a number (`29`) or a semver string (`\"29.1.0\"` or `\"v29.1.0\"`),\nstoring only the major version.\n::: warning\nUsing this config will override the `no-deprecated-functions`' config set.",
388
+ "default": null,
389
+ "allOf": [
390
+ {
391
+ "$ref": "#/definitions/JestVersionSchema"
392
+ }
393
+ ],
394
+ "markdownDescription": "Jest version — accepts a number (`29`) or a semver string (`\"29.1.0\"` or `\"v29.1.0\"`),\nstoring only the major version.\n::: warning\nUsing this config will override the `no-deprecated-functions`' config set."
395
+ }
396
+ },
397
+ "markdownDescription": "Configure Jest plugin rules.\n\nSee [eslint-plugin-jest](https://github.com/jest-community/eslint-plugin-jest)'s\nconfiguration for a full reference."
398
+ },
399
+ "JestVersionSchema": {
400
+ "anyOf": [
401
+ {
402
+ "type": "integer",
403
+ "format": "uint",
404
+ "minimum": 0.0
405
+ },
406
+ {
407
+ "type": "string"
408
+ }
409
+ ]
410
+ },
379
411
  "LintPluginOptionsSchema": {
380
412
  "type": "string",
381
413
  "enum": [
@@ -512,6 +544,11 @@
512
544
  ],
513
545
  "markdownDescription": "Report unused disable directives (e.g. `// oxlint-disable-line` or `// eslint-disable-line`).\n\nEquivalent to passing `--report-unused-disable-directives-severity` on the CLI.\nCLI flags take precedence over this value when both are set.\nOnly supported in the root configuration file."
514
546
  },
547
+ "respectEslintDisableDirectives": {
548
+ "description": "Whether oxlint should respect `eslint-disable*` and `eslint-enable*`\ndirectives in addition to its native `oxlint-*` directives.\n\nDefaults to `true`.\nOnly supported in the root configuration file.",
549
+ "type": "boolean",
550
+ "markdownDescription": "Whether oxlint should respect `eslint-disable*` and `eslint-enable*`\ndirectives in addition to its native `oxlint-*` directives.\n\nDefaults to `true`.\nOnly supported in the root configuration file."
551
+ },
515
552
  "typeAware": {
516
553
  "description": "Enable rules that require type information.\n\nEquivalent to passing `--type-aware` on the CLI.\n\nNote that this requires the `oxlint-tsgolint` package to be installed.",
517
554
  "type": "boolean",
@@ -610,6 +647,16 @@
610
647
  "description": "Configure the behavior of linter plugins.\n\nHere's an example if you're using Next.js in a monorepo:\n\n```json\n{\n\"settings\": {\n\"next\": {\n\"rootDir\": \"apps/dashboard/\"\n},\n\"react\": {\n\"linkComponents\": [\n{ \"name\": \"Link\", \"linkAttribute\": \"to\" }\n]\n},\n\"jsx-a11y\": {\n\"components\": {\n\"Link\": \"a\",\n\"Button\": \"button\"\n}\n}\n}\n}\n```",
611
648
  "type": "object",
612
649
  "properties": {
650
+ "jest": {
651
+ "default": {
652
+ "version": null
653
+ },
654
+ "allOf": [
655
+ {
656
+ "$ref": "#/definitions/JestPluginSettings"
657
+ }
658
+ ]
659
+ },
613
660
  "jsdoc": {
614
661
  "default": {
615
662
  "ignorePrivate": false,
@@ -767,4 +814,4 @@
767
814
  }
768
815
  },
769
816
  "markdownDescription": "Oxlint Configuration File\n\nThis configuration is aligned with ESLint v8's configuration schema (`eslintrc.json`).\n\nUsage: `oxlint -c oxlintrc.json`\n\nExample\n\n`.oxlintrc.json`\n\n```json\n{\n\"$schema\": \"./node_modules/oxlint/configuration_schema.json\",\n\"plugins\": [\"import\", \"typescript\", \"unicorn\"],\n\"env\": {\n\"browser\": true\n},\n\"globals\": {\n\"foo\": \"readonly\"\n},\n\"settings\": {\n\"react\": {\n\"version\": \"18.2.0\"\n},\n\"custom\": { \"option\": true }\n},\n\"rules\": {\n\"eqeqeq\": \"warn\",\n\"import/no-cycle\": \"error\",\n\"react/self-closing-comp\": [\"error\", { \"html\": false }]\n},\n\"overrides\": [\n{\n\"files\": [\"*.test.ts\", \"*.spec.ts\"],\n\"rules\": {\n\"@typescript-eslint/no-explicit-any\": \"off\"\n}\n}\n]\n}\n```\n\n`oxlint.config.ts`\n\n```ts\nimport { defineConfig } from \"oxlint\";\n\nexport default defineConfig({\nplugins: [\"import\", \"typescript\", \"unicorn\"],\nenv: {\n\"browser\": true\n},\nglobals: {\n\"foo\": \"readonly\"\n},\nsettings: {\nreact: {\nversion: \"18.2.0\"\n},\ncustom: { option: true }\n},\nrules: {\n\"eqeqeq\": \"warn\",\n\"import/no-cycle\": \"error\",\n\"react/self-closing-comp\": [\"error\", { \"html\": false }]\n},\noverrides: [\n{\nfiles: [\"*.test.ts\", \"*.spec.ts\"],\nrules: {\n\"@typescript-eslint/no-explicit-any\": \"off\"\n}\n}\n]\n});\n```"
770
- }
817
+ }
package/dist/bindings.js CHANGED
@@ -38,7 +38,7 @@ function requireNative() {
38
38
  }
39
39
  try {
40
40
  let binding = require("@oxlint/binding-android-arm64"), bindingPackageVersion = require("@oxlint/binding-android-arm64/package.json").version;
41
- if (bindingPackageVersion !== "1.60.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.60.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
41
+ if (bindingPackageVersion !== "1.62.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.62.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
42
42
  return binding;
43
43
  } catch (e) {
44
44
  loadErrors.push(e);
@@ -51,7 +51,7 @@ function requireNative() {
51
51
  }
52
52
  try {
53
53
  let binding = require("@oxlint/binding-android-arm-eabi"), bindingPackageVersion = require("@oxlint/binding-android-arm-eabi/package.json").version;
54
- if (bindingPackageVersion !== "1.60.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.60.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
54
+ if (bindingPackageVersion !== "1.62.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.62.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
55
55
  return binding;
56
56
  } catch (e) {
57
57
  loadErrors.push(e);
@@ -65,7 +65,7 @@ function requireNative() {
65
65
  }
66
66
  try {
67
67
  let binding = require("@oxlint/binding-win32-x64-gnu"), bindingPackageVersion = require("@oxlint/binding-win32-x64-gnu/package.json").version;
68
- if (bindingPackageVersion !== "1.60.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.60.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
68
+ if (bindingPackageVersion !== "1.62.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.62.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
69
69
  return binding;
70
70
  } catch (e) {
71
71
  loadErrors.push(e);
@@ -78,7 +78,7 @@ function requireNative() {
78
78
  }
79
79
  try {
80
80
  let binding = require("@oxlint/binding-win32-x64-msvc"), bindingPackageVersion = require("@oxlint/binding-win32-x64-msvc/package.json").version;
81
- if (bindingPackageVersion !== "1.60.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.60.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
81
+ if (bindingPackageVersion !== "1.62.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.62.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
82
82
  return binding;
83
83
  } catch (e) {
84
84
  loadErrors.push(e);
@@ -92,7 +92,7 @@ function requireNative() {
92
92
  }
93
93
  try {
94
94
  let binding = require("@oxlint/binding-win32-ia32-msvc"), bindingPackageVersion = require("@oxlint/binding-win32-ia32-msvc/package.json").version;
95
- if (bindingPackageVersion !== "1.60.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.60.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
95
+ if (bindingPackageVersion !== "1.62.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.62.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
96
96
  return binding;
97
97
  } catch (e) {
98
98
  loadErrors.push(e);
@@ -105,7 +105,7 @@ function requireNative() {
105
105
  }
106
106
  try {
107
107
  let binding = require("@oxlint/binding-win32-arm64-msvc"), bindingPackageVersion = require("@oxlint/binding-win32-arm64-msvc/package.json").version;
108
- if (bindingPackageVersion !== "1.60.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.60.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
108
+ if (bindingPackageVersion !== "1.62.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.62.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
109
109
  return binding;
110
110
  } catch (e) {
111
111
  loadErrors.push(e);
@@ -119,7 +119,7 @@ function requireNative() {
119
119
  }
120
120
  try {
121
121
  let binding = require("@oxlint/binding-darwin-universal"), bindingPackageVersion = require("@oxlint/binding-darwin-universal/package.json").version;
122
- if (bindingPackageVersion !== "1.60.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.60.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
122
+ if (bindingPackageVersion !== "1.62.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.62.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
123
123
  return binding;
124
124
  } catch (e) {
125
125
  loadErrors.push(e);
@@ -132,7 +132,7 @@ function requireNative() {
132
132
  }
133
133
  try {
134
134
  let binding = require("@oxlint/binding-darwin-x64"), bindingPackageVersion = require("@oxlint/binding-darwin-x64/package.json").version;
135
- if (bindingPackageVersion !== "1.60.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.60.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
135
+ if (bindingPackageVersion !== "1.62.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.62.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
136
136
  return binding;
137
137
  } catch (e) {
138
138
  loadErrors.push(e);
@@ -145,7 +145,7 @@ function requireNative() {
145
145
  }
146
146
  try {
147
147
  let binding = require("@oxlint/binding-darwin-arm64"), bindingPackageVersion = require("@oxlint/binding-darwin-arm64/package.json").version;
148
- if (bindingPackageVersion !== "1.60.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.60.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
148
+ if (bindingPackageVersion !== "1.62.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.62.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
149
149
  return binding;
150
150
  } catch (e) {
151
151
  loadErrors.push(e);
@@ -159,7 +159,7 @@ function requireNative() {
159
159
  }
160
160
  try {
161
161
  let binding = require("@oxlint/binding-freebsd-x64"), bindingPackageVersion = require("@oxlint/binding-freebsd-x64/package.json").version;
162
- if (bindingPackageVersion !== "1.60.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.60.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
162
+ if (bindingPackageVersion !== "1.62.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.62.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
163
163
  return binding;
164
164
  } catch (e) {
165
165
  loadErrors.push(e);
@@ -172,7 +172,7 @@ function requireNative() {
172
172
  }
173
173
  try {
174
174
  let binding = require("@oxlint/binding-freebsd-arm64"), bindingPackageVersion = require("@oxlint/binding-freebsd-arm64/package.json").version;
175
- if (bindingPackageVersion !== "1.60.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.60.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
175
+ if (bindingPackageVersion !== "1.62.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.62.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
176
176
  return binding;
177
177
  } catch (e) {
178
178
  loadErrors.push(e);
@@ -186,7 +186,7 @@ function requireNative() {
186
186
  }
187
187
  try {
188
188
  let binding = require("@oxlint/binding-linux-x64-musl"), bindingPackageVersion = require("@oxlint/binding-linux-x64-musl/package.json").version;
189
- if (bindingPackageVersion !== "1.60.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.60.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
189
+ if (bindingPackageVersion !== "1.62.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.62.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
190
190
  return binding;
191
191
  } catch (e) {
192
192
  loadErrors.push(e);
@@ -199,7 +199,7 @@ function requireNative() {
199
199
  }
200
200
  try {
201
201
  let binding = require("@oxlint/binding-linux-x64-gnu"), bindingPackageVersion = require("@oxlint/binding-linux-x64-gnu/package.json").version;
202
- if (bindingPackageVersion !== "1.60.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.60.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
202
+ if (bindingPackageVersion !== "1.62.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.62.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
203
203
  return binding;
204
204
  } catch (e) {
205
205
  loadErrors.push(e);
@@ -213,7 +213,7 @@ function requireNative() {
213
213
  }
214
214
  try {
215
215
  let binding = require("@oxlint/binding-linux-arm64-musl"), bindingPackageVersion = require("@oxlint/binding-linux-arm64-musl/package.json").version;
216
- if (bindingPackageVersion !== "1.60.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.60.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
216
+ if (bindingPackageVersion !== "1.62.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.62.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
217
217
  return binding;
218
218
  } catch (e) {
219
219
  loadErrors.push(e);
@@ -226,7 +226,7 @@ function requireNative() {
226
226
  }
227
227
  try {
228
228
  let binding = require("@oxlint/binding-linux-arm64-gnu"), bindingPackageVersion = require("@oxlint/binding-linux-arm64-gnu/package.json").version;
229
- if (bindingPackageVersion !== "1.60.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.60.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
229
+ if (bindingPackageVersion !== "1.62.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.62.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
230
230
  return binding;
231
231
  } catch (e) {
232
232
  loadErrors.push(e);
@@ -240,7 +240,7 @@ function requireNative() {
240
240
  }
241
241
  try {
242
242
  let binding = require("@oxlint/binding-linux-arm-musleabihf"), bindingPackageVersion = require("@oxlint/binding-linux-arm-musleabihf/package.json").version;
243
- if (bindingPackageVersion !== "1.60.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.60.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
243
+ if (bindingPackageVersion !== "1.62.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.62.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
244
244
  return binding;
245
245
  } catch (e) {
246
246
  loadErrors.push(e);
@@ -253,7 +253,7 @@ function requireNative() {
253
253
  }
254
254
  try {
255
255
  let binding = require("@oxlint/binding-linux-arm-gnueabihf"), bindingPackageVersion = require("@oxlint/binding-linux-arm-gnueabihf/package.json").version;
256
- if (bindingPackageVersion !== "1.60.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.60.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
256
+ if (bindingPackageVersion !== "1.62.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.62.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
257
257
  return binding;
258
258
  } catch (e) {
259
259
  loadErrors.push(e);
@@ -267,7 +267,7 @@ function requireNative() {
267
267
  }
268
268
  try {
269
269
  let binding = require("@oxlint/binding-linux-loong64-musl"), bindingPackageVersion = require("@oxlint/binding-linux-loong64-musl/package.json").version;
270
- if (bindingPackageVersion !== "1.60.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.60.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
270
+ if (bindingPackageVersion !== "1.62.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.62.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
271
271
  return binding;
272
272
  } catch (e) {
273
273
  loadErrors.push(e);
@@ -280,7 +280,7 @@ function requireNative() {
280
280
  }
281
281
  try {
282
282
  let binding = require("@oxlint/binding-linux-loong64-gnu"), bindingPackageVersion = require("@oxlint/binding-linux-loong64-gnu/package.json").version;
283
- if (bindingPackageVersion !== "1.60.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.60.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
283
+ if (bindingPackageVersion !== "1.62.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.62.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
284
284
  return binding;
285
285
  } catch (e) {
286
286
  loadErrors.push(e);
@@ -294,7 +294,7 @@ function requireNative() {
294
294
  }
295
295
  try {
296
296
  let binding = require("@oxlint/binding-linux-riscv64-musl"), bindingPackageVersion = require("@oxlint/binding-linux-riscv64-musl/package.json").version;
297
- if (bindingPackageVersion !== "1.60.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.60.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
297
+ if (bindingPackageVersion !== "1.62.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.62.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
298
298
  return binding;
299
299
  } catch (e) {
300
300
  loadErrors.push(e);
@@ -307,7 +307,7 @@ function requireNative() {
307
307
  }
308
308
  try {
309
309
  let binding = require("@oxlint/binding-linux-riscv64-gnu"), bindingPackageVersion = require("@oxlint/binding-linux-riscv64-gnu/package.json").version;
310
- if (bindingPackageVersion !== "1.60.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.60.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
310
+ if (bindingPackageVersion !== "1.62.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.62.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
311
311
  return binding;
312
312
  } catch (e) {
313
313
  loadErrors.push(e);
@@ -321,7 +321,7 @@ function requireNative() {
321
321
  }
322
322
  try {
323
323
  let binding = require("@oxlint/binding-linux-ppc64-gnu"), bindingPackageVersion = require("@oxlint/binding-linux-ppc64-gnu/package.json").version;
324
- if (bindingPackageVersion !== "1.60.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.60.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
324
+ if (bindingPackageVersion !== "1.62.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.62.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
325
325
  return binding;
326
326
  } catch (e) {
327
327
  loadErrors.push(e);
@@ -334,7 +334,7 @@ function requireNative() {
334
334
  }
335
335
  try {
336
336
  let binding = require("@oxlint/binding-linux-s390x-gnu"), bindingPackageVersion = require("@oxlint/binding-linux-s390x-gnu/package.json").version;
337
- if (bindingPackageVersion !== "1.60.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.60.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
337
+ if (bindingPackageVersion !== "1.62.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.62.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
338
338
  return binding;
339
339
  } catch (e) {
340
340
  loadErrors.push(e);
@@ -348,7 +348,7 @@ function requireNative() {
348
348
  }
349
349
  try {
350
350
  let binding = require("@oxlint/binding-openharmony-arm64"), bindingPackageVersion = require("@oxlint/binding-openharmony-arm64/package.json").version;
351
- if (bindingPackageVersion !== "1.60.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.60.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
351
+ if (bindingPackageVersion !== "1.62.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.62.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
352
352
  return binding;
353
353
  } catch (e) {
354
354
  loadErrors.push(e);
@@ -361,7 +361,7 @@ function requireNative() {
361
361
  }
362
362
  try {
363
363
  let binding = require("@oxlint/binding-openharmony-x64"), bindingPackageVersion = require("@oxlint/binding-openharmony-x64/package.json").version;
364
- if (bindingPackageVersion !== "1.60.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.60.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
364
+ if (bindingPackageVersion !== "1.62.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.62.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
365
365
  return binding;
366
366
  } catch (e) {
367
367
  loadErrors.push(e);
@@ -374,7 +374,7 @@ function requireNative() {
374
374
  }
375
375
  try {
376
376
  let binding = require("@oxlint/binding-openharmony-arm"), bindingPackageVersion = require("@oxlint/binding-openharmony-arm/package.json").version;
377
- if (bindingPackageVersion !== "1.60.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.60.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
377
+ if (bindingPackageVersion !== "1.62.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.62.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
378
378
  return binding;
379
379
  } catch (e) {
380
380
  loadErrors.push(e);
package/dist/index.d.ts CHANGED
@@ -38,6 +38,7 @@ type LintPluginOptionsSchema = "eslint" | "react" | "unicorn" | "typescript" | "
38
38
  type LintPlugins = LintPluginOptionsSchema[];
39
39
  type DummyRule = AllowWarnDeny | [AllowWarnDeny, ...unknown[]];
40
40
  type OxlintOverrides = OxlintOverride[];
41
+ type JestVersionSchema = number | string;
41
42
  type TagNamePreference = string | {
42
43
  message: string;
43
44
  replacement: string;
@@ -196,6 +197,26 @@ interface Oxlintrc$1 {
196
197
  * }
197
198
  * ```
198
199
  *
200
+ * Basic usage with a TypeScript plugin and a local plugin path.
201
+ *
202
+ * TypeScript plugin files are supported in the following environments:
203
+ * - Deno and Bun: TypeScript files are supported natively.
204
+ * - Node.js >=22.18.0 and Node.js ^20.19.0: TypeScript files are supported natively with built-in
205
+ * type-stripping enabled by default.
206
+ *
207
+ * For older Node.js versions, TypeScript plugins are not supported. Please use JavaScript plugins or upgrade your Node version.
208
+ *
209
+ * ```json
210
+ * {
211
+ * "jsPlugins": [
212
+ * "./custom-plugin.ts"
213
+ * ],
214
+ * "rules": {
215
+ * "custom/rule-name": "warn"
216
+ * }
217
+ * }
218
+ * ```
219
+ *
199
220
  * Using a built-in Rust plugin alongside a JS plugin with the same name
200
221
  * by giving the JS plugin an alias.
201
222
  *
@@ -298,8 +319,50 @@ interface RuleCategories {
298
319
  * Predefine global variables.
299
320
  *
300
321
  * Environments specify what global variables are predefined.
301
- * See [ESLint's list of environments](https://eslint.org/docs/v8.x/use/configure/language-options#specifying-environments)
302
- * for what environments are available and what each one provides.
322
+ * Available environments:
323
+ * - amd - require() and define() globals.
324
+ * - applescript - AppleScript globals.
325
+ * - astro - Astro globals.
326
+ * - atomtest - Atom test globals.
327
+ * - audioworklet - AudioWorklet globals.
328
+ * - browser - browser globals.
329
+ * - builtin - Latest ECMAScript globals, equivalent to es2026.
330
+ * - commonjs - CommonJS globals and scoping.
331
+ * - embertest - Ember test globals.
332
+ * - es2015 - ECMAScript 2015 globals.
333
+ * - es2016 - ECMAScript 2016 globals.
334
+ * - es2017 - ECMAScript 2017 globals.
335
+ * - es2018 - ECMAScript 2018 globals.
336
+ * - es2019 - ECMAScript 2019 globals.
337
+ * - es2020 - ECMAScript 2020 globals.
338
+ * - es2021 - ECMAScript 2021 globals.
339
+ * - es2022 - ECMAScript 2022 globals.
340
+ * - es2023 - ECMAScript 2023 globals.
341
+ * - es2024 - ECMAScript 2024 globals.
342
+ * - es2025 - ECMAScript 2025 globals.
343
+ * - es2026 - ECMAScript 2026 globals.
344
+ * - es6 - ECMAScript 6 globals except modules.
345
+ * - greasemonkey - GreaseMonkey globals.
346
+ * - jasmine - Jasmine globals.
347
+ * - jest - Jest globals.
348
+ * - jquery - jQuery globals.
349
+ * - meteor - Meteor globals.
350
+ * - mocha - Mocha globals.
351
+ * - mongo - MongoDB globals.
352
+ * - nashorn - Java 8 Nashorn globals.
353
+ * - node - Node.js globals and scoping.
354
+ * - phantomjs - PhantomJS globals.
355
+ * - prototypejs - Prototype.js globals.
356
+ * - protractor - Protractor globals.
357
+ * - qunit - QUnit globals.
358
+ * - serviceworker - Service Worker globals.
359
+ * - shared-node-browser - Node.js and Browser common globals.
360
+ * - shelljs - ShellJS globals.
361
+ * - svelte - Svelte globals.
362
+ * - vitest - Vitest globals.
363
+ * - vue - Vue globals.
364
+ * - webextensions - WebExtensions globals.
365
+ * - worker - Web Workers globals.
303
366
  */
304
367
  interface OxlintEnv {
305
368
  [k: string]: boolean;
@@ -356,6 +419,14 @@ interface OxlintOptions {
356
419
  * Only supported in the root configuration file.
357
420
  */
358
421
  reportUnusedDisableDirectives?: AllowWarnDeny;
422
+ /**
423
+ * Whether oxlint should respect `eslint-disable*` and `eslint-enable*`
424
+ * directives in addition to its native `oxlint-*` directives.
425
+ *
426
+ * Defaults to `true`.
427
+ * Only supported in the root configuration file.
428
+ */
429
+ respectEslintDisableDirectives?: boolean;
359
430
  /**
360
431
  * Enable rules that require type information.
361
432
  *
@@ -441,6 +512,7 @@ interface DummyRuleMap {
441
512
  * ```
442
513
  */
443
514
  interface OxlintPluginSettings {
515
+ jest?: JestPluginSettings;
444
516
  jsdoc?: JSDocPluginSettings;
445
517
  "jsx-a11y"?: JSXA11YPluginSettings;
446
518
  next?: NextPluginSettings;
@@ -448,6 +520,22 @@ interface OxlintPluginSettings {
448
520
  vitest?: VitestPluginSettings;
449
521
  [k: string]: unknown;
450
522
  }
523
+ /**
524
+ * Configure Jest plugin rules.
525
+ *
526
+ * See [eslint-plugin-jest](https://github.com/jest-community/eslint-plugin-jest)'s
527
+ * configuration for a full reference.
528
+ */
529
+ interface JestPluginSettings {
530
+ /**
531
+ * Jest version — accepts a number (`29`) or a semver string (`"29.1.0"` or `"v29.1.0"`),
532
+ * storing only the major version.
533
+ * ::: warning
534
+ * Using this config will override the `no-deprecated-functions`' config set.
535
+ */
536
+ version?: JestVersionSchema;
537
+ [k: string]: unknown;
538
+ }
451
539
  interface JSDocPluginSettings {
452
540
  /**
453
541
  * Only for `require-(yields|returns|description|example|param|throws)` rule
package/dist/lint.js CHANGED
@@ -4,7 +4,7 @@ import { t as getErrorMessage } from "./utils.js";
4
4
  import { createRequire } from "node:module";
5
5
  import "node:assert";
6
6
  //#region \0rolldown/runtime.js
7
- var __create = Object.create, __defProp = Object.defineProperty, __getOwnPropDesc = Object.getOwnPropertyDescriptor, __getOwnPropNames = Object.getOwnPropertyNames, __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty, __commonJSMin = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports), __copyProps = (to, from, except, desc) => {
7
+ var __create = Object.create, __defProp = Object.defineProperty, __getOwnPropDesc = Object.getOwnPropertyDescriptor, __getOwnPropNames = Object.getOwnPropertyNames, __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty, __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports), __copyProps = (to, from, except, desc) => {
8
8
  if (from && typeof from == "object" || typeof from == "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) key = keys[i], !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
9
9
  get: ((k) => from[k]).bind(null, key),
10
10
  enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
@@ -1048,7 +1048,7 @@ function deserializeArrayExpressionElement(pos) {
1048
1048
  case 49: return deserializeBoxStaticMemberExpression(pos + 8);
1049
1049
  case 50: return deserializeBoxPrivateFieldExpression(pos + 8);
1050
1050
  case 64: return deserializeBoxSpreadElement(pos + 8);
1051
- case 65: return deserializeElision(pos + 8);
1051
+ case 65: return deserializeBoxElision(pos + 8);
1052
1052
  default: throw Error(`Unexpected discriminant ${uint8[pos]} for ArrayExpressionElement`);
1053
1053
  }
1054
1054
  }
@@ -3101,7 +3101,7 @@ function deserializeJSXExpression(pos) {
3101
3101
  case 48: return deserializeBoxComputedMemberExpression(pos + 8);
3102
3102
  case 49: return deserializeBoxStaticMemberExpression(pos + 8);
3103
3103
  case 50: return deserializeBoxPrivateFieldExpression(pos + 8);
3104
- case 64: return deserializeJSXEmptyExpression(pos + 8);
3104
+ case 64: return deserializeBoxJSXEmptyExpression(pos + 8);
3105
3105
  default: throw Error(`Unexpected discriminant ${uint8[pos]} for JSXExpression`);
3106
3106
  }
3107
3107
  }
@@ -4003,12 +4003,12 @@ function deserializeTSTypePredicate(pos) {
4003
4003
  range: [start, end],
4004
4004
  parent
4005
4005
  };
4006
- return node.parameterName = deserializeTSTypePredicateName(pos + 16), node.typeAnnotation = deserializeOptionBoxTSTypeAnnotation(pos + 40), parent = previousParent, node;
4006
+ return node.parameterName = deserializeTSTypePredicateName(pos + 16), node.typeAnnotation = deserializeOptionBoxTSTypeAnnotation(pos + 32), parent = previousParent, node;
4007
4007
  }
4008
4008
  function deserializeTSTypePredicateName(pos) {
4009
4009
  switch (uint8[pos]) {
4010
4010
  case 0: return deserializeBoxIdentifierName(pos + 8);
4011
- case 1: return deserializeTSThisType(pos + 8);
4011
+ case 1: return deserializeBoxTSThisType(pos + 8);
4012
4012
  default: throw Error(`Unexpected discriminant ${uint8[pos]} for TSTypePredicateName`);
4013
4013
  }
4014
4014
  }
@@ -4702,13 +4702,16 @@ function deserializeBoxV8IntrinsicExpression(pos) {
4702
4702
  function deserializeVecArrayExpressionElement(pos) {
4703
4703
  let arr = [], pos32 = pos >> 2;
4704
4704
  pos = int32[pos32];
4705
- let endPos = pos + int32[pos32 + 2] * 24;
4706
- for (; pos !== endPos;) arr.push(deserializeArrayExpressionElement(pos)), pos += 24;
4705
+ let endPos = pos + (int32[pos32 + 2] << 4);
4706
+ for (; pos !== endPos;) arr.push(deserializeArrayExpressionElement(pos)), pos += 16;
4707
4707
  return arr;
4708
4708
  }
4709
4709
  function deserializeBoxSpreadElement(pos) {
4710
4710
  return deserializeSpreadElement(int32[pos >> 2]);
4711
4711
  }
4712
+ function deserializeBoxElision(pos) {
4713
+ return deserializeElision(int32[pos >> 2]);
4714
+ }
4712
4715
  function deserializeVecObjectPropertyKind(pos) {
4713
4716
  let arr = [], pos32 = pos >> 2;
4714
4717
  pos = int32[pos32];
@@ -5145,6 +5148,9 @@ function deserializeBoxJSXNamespacedName(pos) {
5145
5148
  function deserializeBoxJSXMemberExpression(pos) {
5146
5149
  return deserializeJSXMemberExpression(int32[pos >> 2]);
5147
5150
  }
5151
+ function deserializeBoxJSXEmptyExpression(pos) {
5152
+ return deserializeJSXEmptyExpression(int32[pos >> 2]);
5153
+ }
5148
5154
  function deserializeBoxJSXAttribute(pos) {
5149
5155
  return deserializeJSXAttribute(int32[pos >> 2]);
5150
5156
  }
@@ -12017,7 +12023,7 @@ var require_eslint_visitor_keys = /* @__PURE__ */ __commonJSMin(((exports) => {
12017
12023
  let scopeManager = new ScopeManager_1.ScopeManager(options);
12018
12024
  return new referencer_1.Referencer(options, scopeManager).visit(tree), scopeManager;
12019
12025
  }
12020
- })), require_dist = /* @__PURE__ */ __commonJSMin(((exports) => {
12026
+ })), import_dist = (/* @__PURE__ */ __commonJSMin(((exports) => {
12021
12027
  var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o, m, k, k2) {
12022
12028
  k2 === void 0 && (k2 = k);
12023
12029
  var desc = Object.getOwnPropertyDescriptor(m, k);
@@ -12068,9 +12074,7 @@ var require_eslint_visitor_keys = /* @__PURE__ */ __commonJSMin(((exports) => {
12068
12074
  return ScopeManager_1.ScopeManager;
12069
12075
  }
12070
12076
  }), __exportStar(require_variable(), exports);
12071
- }));
12072
- //#endregion
12073
- //#region src-js/plugins/globals.ts
12077
+ })))();
12074
12078
  let globalsJSON = null, globals = null, envs = null;
12075
12079
  /**
12076
12080
  * Updates the globals for the file.
@@ -12636,7 +12640,6 @@ const ENVS = new Map([
12636
12640
  ]);
12637
12641
  //#endregion
12638
12642
  //#region src-js/plugins/scope.ts
12639
- var import_dist = require_dist();
12640
12643
  let tsScopeManager = null;
12641
12644
  const analyzeOptions = {
12642
12645
  childVisitorKeys: void 0,
@@ -12712,15 +12715,36 @@ function resetScopeManager() {
12712
12715
  tsScopeManager = null;
12713
12716
  }
12714
12717
  const SCOPE_MANAGER = ObjectFreeze({
12718
+ /**
12719
+ * All scopes.
12720
+ */
12715
12721
  get scopes() {
12716
12722
  return tsScopeManager === null && initTsScopeManager(), tsScopeManager.scopes;
12717
12723
  },
12724
+ /**
12725
+ * The root scope.
12726
+ */
12718
12727
  get globalScope() {
12719
12728
  return tsScopeManager === null && initTsScopeManager(), tsScopeManager.globalScope;
12720
12729
  },
12730
+ /**
12731
+ * Get the variables that a given AST node defines.
12732
+ * The returned variables' `def[].node` / `def[].parent` property is the node.
12733
+ * If the node does not define any variable, this returns an empty array.
12734
+ * @param node AST node to get variables of.
12735
+ */
12721
12736
  getDeclaredVariables(node) {
12722
12737
  return tsScopeManager === null && initTsScopeManager(), tsScopeManager.getDeclaredVariables(node);
12723
12738
  },
12739
+ /**
12740
+ * Get the scope of a given AST node. The returned scope's `block` property is the node.
12741
+ * This method never returns `function-expression-name` scope.
12742
+ * If the node does not have a scope, returns `null`.
12743
+ *
12744
+ * @param node An AST node to get their scope.
12745
+ * @param inner If the node has multiple scopes, this returns the outermost scope normally.
12746
+ * If `inner` is `true` then this returns the innermost scope.
12747
+ */
12724
12748
  acquire(node, inner) {
12725
12749
  return tsScopeManager === null && initTsScopeManager(), tsScopeManager.acquire(node, inner);
12726
12750
  }
@@ -13514,42 +13538,91 @@ function fileIsJsx() {
13514
13538
  return buffer[2147483613] === 1;
13515
13539
  }
13516
13540
  const SOURCE_CODE = ObjectFreeze({
13541
+ /**
13542
+ * Source text.
13543
+ */
13517
13544
  get text() {
13518
13545
  return sourceText === null && initSourceText(), sourceText;
13519
13546
  },
13547
+ /**
13548
+ * `true` if file has Unicode BOM.
13549
+ */
13520
13550
  get hasBOM() {
13521
13551
  return hasBOM;
13522
13552
  },
13553
+ /**
13554
+ * AST of the file.
13555
+ */
13523
13556
  get ast() {
13524
13557
  return ast === null && initAst(), ast;
13525
13558
  },
13559
+ /**
13560
+ * `true` if the AST is in ESTree format.
13561
+ */
13526
13562
  isESTree: !0,
13563
+ /**
13564
+ * `ScopeManager` for the file.
13565
+ */
13527
13566
  get scopeManager() {
13528
13567
  return SCOPE_MANAGER;
13529
13568
  },
13569
+ /**
13570
+ * Visitor keys to traverse this AST.
13571
+ */
13530
13572
  get visitorKeys() {
13531
13573
  return keys_default;
13532
13574
  },
13575
+ /**
13576
+ * Parser services for the file.
13577
+ *
13578
+ * Oxlint does not offer any parser services.
13579
+ */
13533
13580
  parserServices: ObjectFreeze({}),
13581
+ /**
13582
+ * Source text as array of lines, split according to specification's definition of line breaks.
13583
+ */
13534
13584
  get lines() {
13535
13585
  return lines.length === 0 && initLines(), lines;
13536
13586
  },
13587
+ /**
13588
+ * Character offset of the first character of each line in source text,
13589
+ * split according to specification's definition of line breaks.
13590
+ */
13537
13591
  get lineStartIndices() {
13538
13592
  return lines.length === 0 && initLines(), lineStartIndices;
13539
13593
  },
13594
+ /**
13595
+ * Array of all tokens and comments in the file, in source order.
13596
+ */
13540
13597
  get tokensAndComments() {
13541
13598
  return getTokensAndComments();
13542
13599
  },
13600
+ /**
13601
+ * Get the source code for the given node.
13602
+ * @param node? - The AST node to get the text for.
13603
+ * @param beforeCount? - The number of characters before the node to retrieve.
13604
+ * @param afterCount? - The number of characters after the node to retrieve.
13605
+ * @returns Source text representing the AST node.
13606
+ */
13543
13607
  getText(node, beforeCount, afterCount) {
13544
13608
  if (sourceText === null && initSourceText(), !node) return sourceText;
13545
13609
  let { range } = node, start = range[0], end = range[1];
13546
13610
  return beforeCount && (start = MathMax(start - beforeCount, 0)), afterCount && (end += afterCount), sourceText.slice(start, end);
13547
13611
  },
13612
+ /**
13613
+ * Get all the ancestors of a given node.
13614
+ * @param node - AST node
13615
+ * @returns All the ancestor nodes in the AST, not including the provided node,
13616
+ * starting from the root node at index 0 and going inwards to the parent node.
13617
+ */
13548
13618
  getAncestors(node) {
13549
13619
  let ancestors = [];
13550
13620
  for (; node = node.parent, node !== null;) ancestors.push(node);
13551
13621
  return ancestors.reverse();
13552
13622
  },
13623
+ /**
13624
+ * Get source text as array of lines, split according to specification's definition of line breaks.
13625
+ */
13553
13626
  getLines() {
13554
13627
  return lines.length === 0 && initLines(), lines;
13555
13628
  },
@@ -13993,7 +14066,7 @@ function resetSettings() {
13993
14066
  }
13994
14067
  //#endregion
13995
14068
  //#region package.json
13996
- var version = "1.60.0";
14069
+ var version = "1.62.0";
13997
14070
  //#endregion
13998
14071
  //#region src-js/plugins/context.ts
13999
14072
  let filePath = null, cwd = null;
@@ -14039,12 +14112,30 @@ const SUPPORTED_ECMA_VERSIONS = ObjectFreeze([
14039
14112
  ]);
14040
14113
  let Syntax = null;
14041
14114
  const PARSER = ObjectFreeze({
14115
+ /**
14116
+ * Parser name.
14117
+ */
14042
14118
  name: "oxlint",
14119
+ /**
14120
+ * Parser version.
14121
+ */
14043
14122
  version,
14123
+ /**
14124
+ * Parse code into an AST.
14125
+ * @param code - Code to parse
14126
+ * @param options? - Parser options
14127
+ * @returns AST
14128
+ */
14044
14129
  parse(code, options) {
14045
14130
  throw Error("`context.languageOptions.parser.parse` not implemented yet.");
14046
14131
  },
14132
+ /**
14133
+ * Visitor keys for AST nodes.
14134
+ */
14047
14135
  VisitorKeys: keys_default,
14136
+ /**
14137
+ * Ast node types.
14138
+ */
14048
14139
  get Syntax() {
14049
14140
  if (Syntax === null) {
14050
14141
  Syntax = ObjectCreate(null);
@@ -14053,86 +14144,178 @@ const PARSER = ObjectFreeze({
14053
14144
  }
14054
14145
  return Syntax;
14055
14146
  },
14147
+ /**
14148
+ * Latest ECMAScript version supported by parser.
14149
+ */
14056
14150
  latestEcmaVersion: 17,
14151
+ /**
14152
+ * ECMAScript versions supported by parser.
14153
+ */
14057
14154
  supportedEcmaVersions: SUPPORTED_ECMA_VERSIONS
14058
14155
  }), PARSER_OPTIONS = ObjectFreeze({
14156
+ /**
14157
+ * Source type of the file being linted.
14158
+ */
14059
14159
  get sourceType() {
14060
14160
  return ast === null && initAst(), ast.sourceType;
14061
14161
  },
14162
+ /**
14163
+ * ECMA features.
14164
+ */
14062
14165
  ecmaFeatures: ObjectFreeze({
14166
+ /**
14167
+ * `true` if file was parsed as JSX.
14168
+ */
14063
14169
  get jsx() {
14064
14170
  return fileIsJsx();
14065
14171
  },
14172
+ /**
14173
+ * `true` if file was parsed with top-level `return` statements allowed.
14174
+ */
14066
14175
  get globalReturn() {
14067
14176
  return ast === null && initAst(), ast.sourceType === "commonjs";
14068
14177
  },
14178
+ /**
14179
+ * `true` if file was parsed as strict mode code.
14180
+ */
14069
14181
  get impliedStrict() {
14070
14182
  return ast === null && initAst(), ast.sourceType === "module";
14071
14183
  }
14072
14184
  })
14073
14185
  }), LANGUAGE_OPTIONS = {
14186
+ /**
14187
+ * Source type of the file being linted.
14188
+ */
14074
14189
  get sourceType() {
14075
14190
  return ast === null && initAst(), ast.sourceType;
14076
14191
  },
14192
+ /**
14193
+ * ECMAScript version of the file being linted.
14194
+ */
14077
14195
  ecmaVersion: 2026,
14196
+ /**
14197
+ * Parser used to parse the file being linted.
14198
+ */
14078
14199
  parser: PARSER,
14200
+ /**
14201
+ * Parser options used to parse the file being linted.
14202
+ */
14079
14203
  parserOptions: PARSER_OPTIONS,
14204
+ /**
14205
+ * Globals defined for the file being linted.
14206
+ */
14080
14207
  get globals() {
14081
14208
  return globals === null && initGlobals(), globals;
14082
14209
  },
14210
+ /**
14211
+ * Environments defined for the file being linted.
14212
+ */
14083
14213
  get env() {
14084
14214
  return envs === null && initGlobals(), envs;
14085
14215
  }
14086
14216
  };
14087
14217
  ObjectFreeze(LANGUAGE_OPTIONS);
14088
14218
  const FILE_CONTEXT = ObjectFreeze({
14219
+ /**
14220
+ * Absolute path of the file being linted.
14221
+ */
14089
14222
  get filename() {
14090
14223
  if (filePath === null) throw Error("Cannot access `context.filename` in `createOnce`");
14091
14224
  return filePath;
14092
14225
  },
14226
+ /**
14227
+ * Get absolute path of the file being linted.
14228
+ * @returns Absolute path of the file being linted.
14229
+ * @deprecated Use `context.filename` property instead.
14230
+ */
14093
14231
  getFilename() {
14094
14232
  if (filePath === null) throw Error("Cannot call `context.getFilename` in `createOnce`");
14095
14233
  return filePath;
14096
14234
  },
14235
+ /**
14236
+ * Physical absolute path of the file being linted.
14237
+ */
14097
14238
  get physicalFilename() {
14098
14239
  if (filePath === null) throw Error("Cannot access `context.physicalFilename` in `createOnce`");
14099
14240
  return filePath;
14100
14241
  },
14242
+ /**
14243
+ * Get physical absolute path of the file being linted.
14244
+ * @returns Physical absolute path of the file being linted.
14245
+ * @deprecated Use `context.physicalFilename` property instead.
14246
+ */
14101
14247
  getPhysicalFilename() {
14102
14248
  if (filePath === null) throw Error("Cannot call `context.getPhysicalFilename` in `createOnce`");
14103
14249
  return filePath;
14104
14250
  },
14251
+ /**
14252
+ * Current working directory.
14253
+ */
14105
14254
  get cwd() {
14106
14255
  if (filePath === null) throw Error("Cannot access `context.cwd` in `createOnce`");
14107
14256
  return cwd;
14108
14257
  },
14258
+ /**
14259
+ * Get current working directory.
14260
+ * @returns The current working directory.
14261
+ * @deprecated Use `context.cwd` property instead.
14262
+ */
14109
14263
  getCwd() {
14110
14264
  if (filePath === null) throw Error("Cannot call `context.getCwd` in `createOnce`");
14111
14265
  return cwd;
14112
14266
  },
14267
+ /**
14268
+ * Source code of the file being linted.
14269
+ */
14113
14270
  get sourceCode() {
14114
14271
  if (filePath === null) throw Error("Cannot access `context.sourceCode` in `createOnce`");
14115
14272
  return SOURCE_CODE;
14116
14273
  },
14274
+ /**
14275
+ * Get source code of the file being linted.
14276
+ * @returns Source code of the file being linted.
14277
+ * @deprecated Use `context.sourceCode` property instead.
14278
+ */
14117
14279
  getSourceCode() {
14118
14280
  if (filePath === null) throw Error("Cannot call `context.getSourceCode` in `createOnce`");
14119
14281
  return SOURCE_CODE;
14120
14282
  },
14283
+ /**
14284
+ * Language options used when parsing this file.
14285
+ */
14121
14286
  get languageOptions() {
14122
14287
  if (filePath === null) throw Error("Cannot access `context.languageOptions` in `createOnce`");
14123
14288
  return LANGUAGE_OPTIONS;
14124
14289
  },
14290
+ /**
14291
+ * Settings for the file being linted.
14292
+ */
14125
14293
  get settings() {
14126
14294
  if (filePath === null) throw Error("Cannot access `context.settings` in `createOnce`");
14127
14295
  return settings === null && initSettings(), settings;
14128
14296
  },
14297
+ /**
14298
+ * Create a new object with the current object as the prototype and
14299
+ * the specified properties as its own properties.
14300
+ * @param extension - The properties to add to the new object.
14301
+ * @returns A new object with the current object as the prototype
14302
+ * and the specified properties as its own properties.
14303
+ */
14129
14304
  extend(extension) {
14130
14305
  return ObjectFreeze(ObjectAssign(ObjectCreate(this), extension));
14131
14306
  },
14307
+ /**
14308
+ * Parser options used to parse the file being linted.
14309
+ * @deprecated Use `languageOptions.parserOptions` instead.
14310
+ */
14132
14311
  get parserOptions() {
14133
14312
  if (filePath === null) throw Error("Cannot access `context.parserOptions` in `createOnce`");
14134
14313
  return PARSER_OPTIONS;
14135
14314
  },
14315
+ /**
14316
+ * The path to the parser used to parse this file.
14317
+ * @deprecated No longer supported.
14318
+ */
14136
14319
  get parserPath() {
14137
14320
  if (filePath === null) throw Error("Cannot access `context.parserPath` in `createOnce`");
14138
14321
  }
@@ -14155,6 +14338,20 @@ function createContext(ruleDetails) {
14155
14338
  configurable: !0
14156
14339
  },
14157
14340
  report: {
14341
+ /**
14342
+ * Report error.
14343
+ *
14344
+ * Normally called with a single `Diagnostic` object.
14345
+ *
14346
+ * Can also be called with legacy positional forms:
14347
+ * - `context.report(node, message, data?, fix?)`
14348
+ * - `context.report(node, loc, message, data?, fix?)`
14349
+ * These legacy forms are not included in type def for this method, as they are deprecated,
14350
+ * but some plugins still use them, so we support them.
14351
+ *
14352
+ * @param diagnostic - Diagnostic object
14353
+ * @throws {TypeError} If `diagnostic` is invalid
14354
+ */
14158
14355
  value(diagnostic, ...extraArgs) {
14159
14356
  report(diagnostic, extraArgs, ruleDetails);
14160
14357
  },
@@ -14419,7 +14616,19 @@ var require_uri_all = /* @__PURE__ */ __commonJSMin(((exports, module) => {
14419
14616
  }
14420
14617
  return output.join("");
14421
14618
  }, punycode = {
14619
+ /**
14620
+ * A string representing the current Punycode.js version number.
14621
+ * @memberOf punycode
14622
+ * @type String
14623
+ */
14422
14624
  version: "2.1.0",
14625
+ /**
14626
+ * An object of methods to convert from JavaScript's internal character
14627
+ * representation (UCS-2) to Unicode code points, and back.
14628
+ * @see <https://mathiasbynens.be/notes/javascript-encoding>
14629
+ * @memberOf punycode
14630
+ * @type Object
14631
+ */
14423
14632
  ucs2: {
14424
14633
  decode: ucs2decode,
14425
14634
  encode: ucs2encode
@@ -16699,7 +16908,7 @@ var require_uri_all = /* @__PURE__ */ __commonJSMin(((exports, module) => {
16699
16908
  } },
16700
16909
  additionalProperties: !1
16701
16910
  };
16702
- })), require_ajv = /* @__PURE__ */ __commonJSMin(((exports, module) => {
16911
+ })), import_ajv = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports, module) => {
16703
16912
  var compileSchema = require_compile(), resolve = require_resolve(), Cache = require_cache(), SchemaObject = require_schema_obj(), stableStringify = require_fast_json_stable_stringify(), formats = require_formats(), rules = require_rules(), $dataMetaSchema = require_data$1(), util = require_util();
16704
16913
  module.exports = Ajv, Ajv.prototype.validate = validate, Ajv.prototype.compile = compile, Ajv.prototype.addSchema = addSchema, Ajv.prototype.addMetaSchema = addMetaSchema, Ajv.prototype.validateSchema = validateSchema, Ajv.prototype.getSchema = getSchema, Ajv.prototype.removeSchema = removeSchema, Ajv.prototype.addFormat = addFormat, Ajv.prototype.errorsText = errorsText, Ajv.prototype._addSchema = _addSchema, Ajv.prototype._compile = _compile, Ajv.prototype.compileAsync = require_async();
16705
16914
  var customKeyword = require_keyword();
@@ -16990,7 +17199,7 @@ var require_uri_all = /* @__PURE__ */ __commonJSMin(((exports, module) => {
16990
17199
  }
16991
17200
  }
16992
17201
  function noop() {}
16993
- })), id = "http://json-schema.org/draft-04/schema#", json_schema_draft_04_default = {
17202
+ })))(), 1), id = "http://json-schema.org/draft-04/schema#", json_schema_draft_04_default = {
16994
17203
  id,
16995
17204
  $schema: "http://json-schema.org/draft-04/schema#",
16996
17205
  description: "Core schema meta-schema",
@@ -17121,7 +17330,6 @@ function switchWorkspace(workspaceUri) {
17121
17330
  }
17122
17331
  //#endregion
17123
17332
  //#region src-js/plugins/options.ts
17124
- var import_ajv = /* @__PURE__ */ __toESM(require_ajv(), 1);
17125
17333
  const DEFAULT_OPTIONS = ObjectFreeze([]);
17126
17334
  let allOptions = null;
17127
17335
  /**
@@ -17867,7 +18075,7 @@ var require_assert = /* @__PURE__ */ __commonJSMin(((exports, module) => {
17867
18075
  "GITHUB_ACTIONS",
17868
18076
  "BUILDKITE"
17869
18077
  ].some((sign) => sign in env) || env.CI_NAME === "codeship" ? 1 : min;
17870
- if ("TEAMCITY_VERSION" in env) return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
18078
+ if ("TEAMCITY_VERSION" in env) return +!!/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION);
17871
18079
  if (env.COLORTERM === "truecolor") return 3;
17872
18080
  if ("TERM_PROGRAM" in env) {
17873
18081
  let version = parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
@@ -18090,8 +18298,24 @@ var require_assert = /* @__PURE__ */ __commonJSMin(((exports, module) => {
18090
18298
  }
18091
18299
  }
18092
18300
  module.exports = {
18301
+ /**
18302
+ * A flag that debug dumping is enabled or not.
18303
+ * @type {boolean}
18304
+ */
18093
18305
  enabled: debug.enabled,
18306
+ /**
18307
+ * Dumps given objects.
18308
+ * @param {...any} args objects to dump.
18309
+ * @returns {void}
18310
+ */
18094
18311
  dump: debug,
18312
+ /**
18313
+ * Dumps the current analyzing state.
18314
+ * @param {ASTNode} node A node to dump.
18315
+ * @param {CodePathState} state A state to dump.
18316
+ * @param {boolean} leaving A flag whether or not it's leaving
18317
+ * @returns {void}
18318
+ */
18095
18319
  dumpState: debug.enabled ? function(node, state, leaving) {
18096
18320
  for (let i = 0; i < state.currentSegments.length; ++i) {
18097
18321
  let segInternal = state.currentSegments[i].internal;
@@ -18102,6 +18326,14 @@ var require_assert = /* @__PURE__ */ __commonJSMin(((exports, module) => {
18102
18326
  }
18103
18327
  debug([`${state.currentSegments.map(getId).join(",")})`, `${node.type}${leaving ? ":exit" : ""}`].join(" "));
18104
18328
  } : debug,
18329
+ /**
18330
+ * Dumps a DOT code of a given code path.
18331
+ * The DOT code can be visualized with Graphvis.
18332
+ * @param {CodePath} codePath A code path to dump.
18333
+ * @returns {void}
18334
+ * @see http://www.graphviz.org
18335
+ * @see http://www.webgraphviz.com
18336
+ */
18105
18337
  dumpDot: debug.enabled ? function(codePath) {
18106
18338
  let text = "\ndigraph {\nnode[shape=box,style=\"rounded,filled\",fillcolor=white];\ninitial[label=\"\",shape=circle,style=filled,fillcolor=black,width=0.25,height=0.25];\n";
18107
18339
  codePath.returnedSegments.length > 0 && (text += "final[label=\"\",shape=doublecircle,style=filled,fillcolor=black,width=0.25,height=0.25];\n"), codePath.thrownSegments.length > 0 && (text += "thrown[label=\"✘\",shape=circle,width=0.3,height=0.3,fixedsize=true];\n");
@@ -18112,6 +18344,13 @@ var require_assert = /* @__PURE__ */ __commonJSMin(((exports, module) => {
18112
18344
  }
18113
18345
  text += `${arrows}\n`, text += "}", debug("DOT", text);
18114
18346
  } : debug,
18347
+ /**
18348
+ * Makes a DOT code of a given code path.
18349
+ * The DOT code can be visualized with Graphvis.
18350
+ * @param {CodePath} codePath A code path to make DOT.
18351
+ * @param {Object} traceMap Optional. A map to check whether or not segments had been done.
18352
+ * @returns {string} A DOT code of the code path.
18353
+ */
18115
18354
  makeDotArrows(codePath, traceMap) {
18116
18355
  let stack = [[codePath.initialSegment, 0]], done = traceMap || Object.create(null), lastId = codePath.initialSegment.id, text = `initial->${codePath.initialSegment.id}`;
18117
18356
  for (; stack.length > 0;) {
@@ -18902,6 +19141,7 @@ var require_assert = /* @__PURE__ */ __commonJSMin(((exports, module) => {
18902
19141
  poppedChoiceContext.processed ? (poppedChoiceContext.falseForkContext.clear(), poppedChoiceContext.falseForkContext.add(head)) : (poppedChoiceContext.trueForkContext.clear(), poppedChoiceContext.trueForkContext.add(head));
18903
19142
  break;
18904
19143
  case "loop": return poppedChoiceContext;
19144
+ /* c8 ignore next */
18905
19145
  default: throw Error("unreachable");
18906
19146
  }
18907
19147
  let combinedForkContext = poppedChoiceContext.trueForkContext;
@@ -19141,6 +19381,7 @@ var require_assert = /* @__PURE__ */ __commonJSMin(((exports, module) => {
19141
19381
  case "ForOfStatement":
19142
19382
  this.loopContext = new ForOfLoopContext(this.loopContext, label, breakContext);
19143
19383
  break;
19384
+ /* c8 ignore next */
19144
19385
  default: throw Error(`unknown type: "${type}"`);
19145
19386
  }
19146
19387
  }
@@ -19169,6 +19410,7 @@ var require_assert = /* @__PURE__ */ __commonJSMin(((exports, module) => {
19169
19410
  case "ForOfStatement":
19170
19411
  brokenForkContext.add(forkContext.head), makeLooped(this, forkContext.head, context.leftSegments);
19171
19412
  break;
19413
+ /* c8 ignore next */
19172
19414
  default: throw Error("unreachable");
19173
19415
  }
19174
19416
  brokenForkContext.empty ? forkContext.replaceHead(forkContext.makeUnreachable(-1, -1)) : forkContext.replaceHead(brokenForkContext.makeNext(0, -1));
@@ -19472,9 +19714,18 @@ var require_assert = /* @__PURE__ */ __commonJSMin(((exports, module) => {
19472
19714
  let resolvedOptions, resolvedCallback;
19473
19715
  typeof optionsOrCallback == "function" ? (resolvedCallback = optionsOrCallback, resolvedOptions = {}) : (resolvedOptions = optionsOrCallback || {}, resolvedCallback = callback);
19474
19716
  let startSegment = resolvedOptions.first || this.internal.initialSegment, lastSegment = resolvedOptions.last, record, index, end, segment = null, visited = /* @__PURE__ */ new Set(), stack = [[startSegment, 0]], skipped = /* @__PURE__ */ new Set(), broken = !1, controller = {
19717
+ /**
19718
+ * Skip the following segments in this branch.
19719
+ * @returns {void}
19720
+ */
19475
19721
  skip() {
19476
19722
  skipped.add(segment);
19477
19723
  },
19724
+ /**
19725
+ * Stop traversal completely - do not traverse to any
19726
+ * other segments.
19727
+ * @returns {void}
19728
+ */
19478
19729
  break() {
19479
19730
  broken = !0;
19480
19731
  }
@@ -19513,7 +19764,7 @@ var require_assert = /* @__PURE__ */ __commonJSMin(((exports, module) => {
19513
19764
  }
19514
19765
  };
19515
19766
  module.exports = CodePath;
19516
- })), require_code_path_analyzer = /* @__PURE__ */ __commonJSMin(((exports, module) => {
19767
+ })), import_code_path_analyzer = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports, module) => {
19517
19768
  let assert = require_assert(), { breakableTypePattern } = require_ast_utils(), CodePath = require_code_path(), CodePathSegment = require_code_path_segment(), IdGenerator = require_id_generator(), debug = require_debug_helpers();
19518
19769
  /**
19519
19770
  * Checks whether or not a given node is a `case` node (not `default` node).
@@ -19937,9 +20188,7 @@ var require_assert = /* @__PURE__ */ __commonJSMin(((exports, module) => {
19937
20188
  }
19938
20189
  };
19939
20190
  module.exports = CodePathAnalyzer;
19940
- }));
19941
- //#endregion
19942
- //#region src-js/generated/type_ids.ts
20191
+ })))(), 1);
19943
20192
  /** Mapping from node type name to node type ID */
19944
20193
  const NODE_TYPE_IDS_MAP = new Map([
19945
20194
  ["DebuggerStatement", 0],
@@ -21410,7 +21659,6 @@ function walkTSUnionType(node, visitors) {
21410
21659
  }
21411
21660
  //#endregion
21412
21661
  //#region src-js/plugins/cfg.ts
21413
- var import_code_path_analyzer = /* @__PURE__ */ __toESM(require_code_path_analyzer(), 1);
21414
21662
  /**
21415
21663
  * Offset added to type IDs for exit visits to distinguish them from enter visits.
21416
21664
  * Using 256 as it's a power of 2 and larger than the maximum type ID (171).
@@ -1,4 +1,4 @@
1
- //#region ../../node_modules/.pnpm/type-fest@5.5.0/node_modules/type-fest/source/is-any.d.ts
1
+ //#region ../../node_modules/.pnpm/type-fest@5.6.0/node_modules/type-fest/source/is-any.d.ts
2
2
  /**
3
3
  Returns a boolean for whether the given type is `any`.
4
4
 
@@ -29,7 +29,7 @@ const anyA = get(anyObject, 'a');
29
29
  */
30
30
  type IsAny<T> = 0 extends 1 & NoInfer<T> ? true : false;
31
31
  //#endregion
32
- //#region ../../node_modules/.pnpm/type-fest@5.5.0/node_modules/type-fest/source/is-optional-key-of.d.ts
32
+ //#region ../../node_modules/.pnpm/type-fest@5.6.0/node_modules/type-fest/source/is-optional-key-of.d.ts
33
33
  /**
34
34
  Returns a boolean for whether the given key is an optional key of type.
35
35
 
@@ -72,7 +72,7 @@ type T5 = IsOptionalKeyOf<User | Admin, 'surname'>;
72
72
  */
73
73
  type IsOptionalKeyOf<Type extends object, Key extends keyof Type> = IsAny<Type | Key> extends true ? never : Key extends keyof Type ? Type extends Record<Key, Type[Key]> ? false : true : false;
74
74
  //#endregion
75
- //#region ../../node_modules/.pnpm/type-fest@5.5.0/node_modules/type-fest/source/optional-keys-of.d.ts
75
+ //#region ../../node_modules/.pnpm/type-fest@5.6.0/node_modules/type-fest/source/optional-keys-of.d.ts
76
76
  /**
77
77
  Extract all optional keys from the given type.
78
78
 
@@ -110,7 +110,7 @@ type OptionalKeysOf<Type extends object> = Type extends unknown // For distribut
110
110
  ? (keyof { [Key in keyof Type as IsOptionalKeyOf<Type, Key> extends false ? never : Key]: never }) & keyof Type // Intersect with `keyof Type` to ensure result of `OptionalKeysOf<Type>` is always assignable to `keyof Type`
111
111
  : never;
112
112
  //#endregion
113
- //#region ../../node_modules/.pnpm/type-fest@5.5.0/node_modules/type-fest/source/required-keys-of.d.ts
113
+ //#region ../../node_modules/.pnpm/type-fest@5.6.0/node_modules/type-fest/source/required-keys-of.d.ts
114
114
  /**
115
115
  Extract all required keys from the given type.
116
116
 
@@ -144,7 +144,7 @@ const validator3 = createValidation<User>('luckyNumber', value => value > 0);
144
144
  type RequiredKeysOf<Type extends object> = Type extends unknown // For distributing `Type`
145
145
  ? Exclude<keyof Type, OptionalKeysOf<Type>> : never;
146
146
  //#endregion
147
- //#region ../../node_modules/.pnpm/type-fest@5.5.0/node_modules/type-fest/source/is-never.d.ts
147
+ //#region ../../node_modules/.pnpm/type-fest@5.6.0/node_modules/type-fest/source/is-never.d.ts
148
148
  /**
149
149
  Returns a boolean for whether the given type is `never`.
150
150
 
@@ -200,7 +200,7 @@ type B = IsTrueFixed<never>;
200
200
  */
201
201
  type IsNever<T> = [T] extends [never] ? true : false;
202
202
  //#endregion
203
- //#region ../../node_modules/.pnpm/type-fest@5.5.0/node_modules/type-fest/source/if.d.ts
203
+ //#region ../../node_modules/.pnpm/type-fest@5.6.0/node_modules/type-fest/source/if.d.ts
204
204
  /**
205
205
  An if-else-like type that resolves depending on whether the given `boolean` type is `true` or `false`.
206
206
 
@@ -295,7 +295,7 @@ type Works = IncludesWithoutIf<HundredZeroes, '1'>;
295
295
  */
296
296
  type If<Type extends boolean, IfBranch, ElseBranch> = IsNever<Type> extends true ? ElseBranch : Type extends true ? IfBranch : ElseBranch;
297
297
  //#endregion
298
- //#region ../../node_modules/.pnpm/type-fest@5.5.0/node_modules/type-fest/source/internal/type.d.ts
298
+ //#region ../../node_modules/.pnpm/type-fest@5.6.0/node_modules/type-fest/source/internal/type.d.ts
299
299
  /**
300
300
  An if-else-like type that resolves depending on whether the given type is `any` or `never`.
301
301
 
@@ -342,7 +342,7 @@ type T2 = TrimLeftOptimised<NineHundredNinetyNineSpaces>;
342
342
  */
343
343
  type IfNotAnyOrNever<T, IfNotAnyOrNever, IfAny = any, IfNever = never> = If<IsAny<T>, IfAny, If<IsNever<T>, IfNever, IfNotAnyOrNever>>;
344
344
  //#endregion
345
- //#region ../../node_modules/.pnpm/type-fest@5.5.0/node_modules/type-fest/source/simplify.d.ts
345
+ //#region ../../node_modules/.pnpm/type-fest@5.6.0/node_modules/type-fest/source/simplify.d.ts
346
346
  /**
347
347
  Useful to flatten the type output to improve type hints shown in editors. And also to transform an interface into a type to aide with assignability.
348
348
 
@@ -403,7 +403,7 @@ fn(someInterface as Simplify<SomeInterface>); // Good: transform an `interface`
403
403
  */
404
404
  type Simplify<T> = { [KeyType in keyof T]: T[KeyType] } & {};
405
405
  //#endregion
406
- //#region ../../node_modules/.pnpm/type-fest@5.5.0/node_modules/type-fest/source/is-equal.d.ts
406
+ //#region ../../node_modules/.pnpm/type-fest@5.6.0/node_modules/type-fest/source/is-equal.d.ts
407
407
  /**
408
408
  Returns a boolean for whether the two given types are equal.
409
409
 
@@ -434,7 +434,7 @@ type IsEqual<A, B> = [A] extends [B] ? [B] extends [A] ? _IsEqual<A, B> : false
434
434
  // This version fails the `equalWrappedTupleIntersectionToBeNeverAndNeverExpanded` test in `test-d/is-equal.ts`.
435
435
  type _IsEqual<A, B> = (<G>() => G extends A & G | G ? 1 : 2) extends (<G>() => G extends B & G | G ? 1 : 2) ? true : false;
436
436
  //#endregion
437
- //#region ../../node_modules/.pnpm/type-fest@5.5.0/node_modules/type-fest/source/omit-index-signature.d.ts
437
+ //#region ../../node_modules/.pnpm/type-fest@5.6.0/node_modules/type-fest/source/omit-index-signature.d.ts
438
438
  /**
439
439
  Omit any index signatures from the given object type, leaving only explicitly defined properties.
440
440
 
@@ -528,7 +528,7 @@ type ExampleWithoutIndexSignatures = OmitIndexSignature<Example>;
528
528
  */
529
529
  type OmitIndexSignature<ObjectType> = { [KeyType in keyof ObjectType as {} extends Record<KeyType, unknown> ? never : KeyType]: ObjectType[KeyType] };
530
530
  //#endregion
531
- //#region ../../node_modules/.pnpm/type-fest@5.5.0/node_modules/type-fest/source/pick-index-signature.d.ts
531
+ //#region ../../node_modules/.pnpm/type-fest@5.6.0/node_modules/type-fest/source/pick-index-signature.d.ts
532
532
  /**
533
533
  Pick only index signatures from the given object type, leaving out all explicitly defined properties.
534
534
 
@@ -576,7 +576,7 @@ type ExampleIndexSignature = PickIndexSignature<Example>;
576
576
  */
577
577
  type PickIndexSignature<ObjectType> = { [KeyType in keyof ObjectType as {} extends Record<KeyType, unknown> ? KeyType : never]: ObjectType[KeyType] };
578
578
  //#endregion
579
- //#region ../../node_modules/.pnpm/type-fest@5.5.0/node_modules/type-fest/source/merge.d.ts
579
+ //#region ../../node_modules/.pnpm/type-fest@5.6.0/node_modules/type-fest/source/merge.d.ts
580
580
  // Merges two objects without worrying about index signatures.
581
581
  type SimpleMerge<Destination, Source> = Simplify<{ [Key in keyof Destination as Key extends keyof Source ? never : Key]: Destination[Key] } & Source>;
582
582
  /**
@@ -648,7 +648,7 @@ type Merge<Destination, Source> = Destination extends unknown // For distributin
648
648
  // Should never happen
649
649
  type _Merge<Destination, Source> = Simplify<SimpleMerge<PickIndexSignature<Destination>, PickIndexSignature<Source>> & SimpleMerge<OmitIndexSignature<Destination>, OmitIndexSignature<Source>>>;
650
650
  //#endregion
651
- //#region ../../node_modules/.pnpm/type-fest@5.5.0/node_modules/type-fest/source/internal/object.d.ts
651
+ //#region ../../node_modules/.pnpm/type-fest@5.6.0/node_modules/type-fest/source/internal/object.d.ts
652
652
  /**
653
653
  Merges user specified options with default options.
654
654
 
@@ -703,7 +703,7 @@ type Result = ApplyDefaultOptions<PathsOptions, DefaultPathsOptions, SpecifiedOp
703
703
  */
704
704
  type ApplyDefaultOptions<Options extends object, Defaults extends Simplify<Omit<Required<Options>, RequiredKeysOf<Options>> & Partial<Record<RequiredKeysOf<Options>, never>>>, SpecifiedOptions extends Options> = If<IsAny<SpecifiedOptions>, Defaults, If<IsNever<SpecifiedOptions>, Defaults, Simplify<Merge<Defaults, { [Key in keyof SpecifiedOptions as Key extends OptionalKeysOf<Options> ? undefined extends SpecifiedOptions[Key] ? never : Key : Key]: SpecifiedOptions[Key] }> & Required<Options>>>>;
705
705
  //#endregion
706
- //#region ../../node_modules/.pnpm/type-fest@5.5.0/node_modules/type-fest/source/except.d.ts
706
+ //#region ../../node_modules/.pnpm/type-fest@5.6.0/node_modules/type-fest/source/except.d.ts
707
707
  /**
708
708
  Filter out keys from an object.
709
709
 
@@ -801,9 +801,9 @@ type PostPayloadFixed = Except<UserData, 'email'>;
801
801
  type Except<ObjectType, KeysType extends keyof ObjectType, Options extends ExceptOptions = {}> = _Except<ObjectType, KeysType, ApplyDefaultOptions<ExceptOptions, DefaultExceptOptions, Options>>;
802
802
  type _Except<ObjectType, KeysType extends keyof ObjectType, Options extends Required<ExceptOptions>> = { [KeyType in keyof ObjectType as Filter<KeyType, KeysType>]: ObjectType[KeyType] } & (Options['requireExactProps'] extends true ? Partial<Record<KeysType, never>> : {});
803
803
  //#endregion
804
- //#region ../../node_modules/.pnpm/type-fest@5.5.0/node_modules/type-fest/source/require-at-least-one.d.ts
804
+ //#region ../../node_modules/.pnpm/type-fest@5.6.0/node_modules/type-fest/source/require-at-least-one.d.ts
805
805
  /**
806
- Create a type that requires at least one of the given keys. The remaining keys are kept as is.
806
+ Create a type that requires at least one of the given keys, while keeping the remaining keys as is.
807
807
 
808
808
  @example
809
809
  ```
@@ -825,10 +825,9 @@ const responder: RequireAtLeastOne<Responder, 'text' | 'json'> = {
825
825
  */
826
826
  type RequireAtLeastOne<ObjectType, KeysType extends keyof ObjectType = keyof ObjectType> = IfNotAnyOrNever<ObjectType, If<IsNever<KeysType>, never, _RequireAtLeastOne<ObjectType, If<IsAny<KeysType>, keyof ObjectType, KeysType>>>>;
827
827
  type _RequireAtLeastOne<ObjectType, KeysType extends keyof ObjectType> = { // For each `Key` in `KeysType` make a mapped type:
828
- [Key in KeysType]-?: Required<Pick<ObjectType, Key>> & // 1. Make `Key`'s type required
829
- // 2. Make all other keys in `KeysType` optional
830
- Partial<Pick<ObjectType, Exclude<KeysType, Key>>> }[KeysType] & // 3. Add the remaining keys not in `KeysType`
831
- Except<ObjectType, KeysType>;
828
+ // 2. Make all other keys in `KeysType` optional
829
+ [Key in KeysType]-?: Required<Pick<ObjectType, Key>> // 1. Make `Key`'s type required
830
+ & Partial<Pick<ObjectType, Exclude<KeysType, Key>>> }[KeysType] & Except<ObjectType, KeysType>; // 3. Add the remaining keys not in `KeysType`
832
831
  //#endregion
833
832
  //#region src-js/plugins/globals.d.ts
834
833
  /**
@@ -3847,11 +3846,10 @@ interface RuleMeta {
3847
3846
  */
3848
3847
  deprecated?: boolean | RuleDeprecatedInfo;
3849
3848
  /**
3850
- * Information about available replacements for the rule.
3851
- * This may be an empty array to explicitly state there is no replacement.
3849
+ * Name of the rule(s) this rule was replaced by, if it was deprecated.
3852
3850
  * @deprecated Use `deprecated.replacedBy` instead.
3853
3851
  */
3854
- replacedBy?: RuleReplacedByInfo[];
3852
+ replacedBy?: readonly string[];
3855
3853
  }
3856
3854
  /**
3857
3855
  * Rule documentation.
@@ -432,7 +432,7 @@ function assertMessageIdIsCorrect(reportedMessageId, reportedMessage, messageId,
432
432
  * @throws {AssertionError} If diagnostic's location does not match expected location
433
433
  */
434
434
  function assertInvalidTestCaseLocationIsCorrect(diagnostic, error, test) {
435
- let actualLocation = {}, expectedLocation = {}, columnOffset = test.eslintCompat === !0 ? 1 : 0;
435
+ let actualLocation = {}, expectedLocation = {}, columnOffset = +(test.eslintCompat === !0);
436
436
  ObjectHasOwn(error, "line") && (actualLocation.line = diagnostic.line, expectedLocation.line = error.line), ObjectHasOwn(error, "column") && (actualLocation.column = diagnostic.column + columnOffset, expectedLocation.column = error.column);
437
437
  let canVoidEndLocation = test.eslintCompat === !0 && diagnostic.endLine === diagnostic.line && diagnostic.endColumn === diagnostic.column;
438
438
  ObjectHasOwn(error, "endLine") && (error.endLine === void 0 && canVoidEndLocation ? actualLocation.endLine = void 0 : actualLocation.endLine = diagnostic.endLine, expectedLocation.endLine = error.endLine), ObjectHasOwn(error, "endColumn") && (error.endColumn === void 0 && canVoidEndLocation ? actualLocation.endColumn = void 0 : actualLocation.endColumn = diagnostic.endColumn + columnOffset, expectedLocation.endColumn = error.endColumn), ObjectKeys(expectedLocation).length > 0 && assert.deepStrictEqual(actualLocation, expectedLocation, "Actual error location does not match expected error location.");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oxlint",
3
- "version": "1.60.0",
3
+ "version": "1.62.0",
4
4
  "description": "Linter for the JavaScript Oxidation Compiler",
5
5
  "keywords": [
6
6
  "eslint",
@@ -83,24 +83,24 @@
83
83
  },
84
84
  "preferUnplugged": true,
85
85
  "optionalDependencies": {
86
- "@oxlint/binding-darwin-arm64": "1.60.0",
87
- "@oxlint/binding-android-arm64": "1.60.0",
88
- "@oxlint/binding-win32-arm64-msvc": "1.60.0",
89
- "@oxlint/binding-linux-arm64-gnu": "1.60.0",
90
- "@oxlint/binding-linux-arm64-musl": "1.60.0",
91
- "@oxlint/binding-openharmony-arm64": "1.60.0",
92
- "@oxlint/binding-android-arm-eabi": "1.60.0",
93
- "@oxlint/binding-linux-arm-gnueabihf": "1.60.0",
94
- "@oxlint/binding-linux-arm-musleabihf": "1.60.0",
95
- "@oxlint/binding-win32-ia32-msvc": "1.60.0",
96
- "@oxlint/binding-linux-ppc64-gnu": "1.60.0",
97
- "@oxlint/binding-linux-riscv64-gnu": "1.60.0",
98
- "@oxlint/binding-linux-riscv64-musl": "1.60.0",
99
- "@oxlint/binding-linux-s390x-gnu": "1.60.0",
100
- "@oxlint/binding-darwin-x64": "1.60.0",
101
- "@oxlint/binding-win32-x64-msvc": "1.60.0",
102
- "@oxlint/binding-freebsd-x64": "1.60.0",
103
- "@oxlint/binding-linux-x64-gnu": "1.60.0",
104
- "@oxlint/binding-linux-x64-musl": "1.60.0"
86
+ "@oxlint/binding-darwin-arm64": "1.62.0",
87
+ "@oxlint/binding-android-arm64": "1.62.0",
88
+ "@oxlint/binding-win32-arm64-msvc": "1.62.0",
89
+ "@oxlint/binding-linux-arm64-gnu": "1.62.0",
90
+ "@oxlint/binding-linux-arm64-musl": "1.62.0",
91
+ "@oxlint/binding-openharmony-arm64": "1.62.0",
92
+ "@oxlint/binding-android-arm-eabi": "1.62.0",
93
+ "@oxlint/binding-linux-arm-gnueabihf": "1.62.0",
94
+ "@oxlint/binding-linux-arm-musleabihf": "1.62.0",
95
+ "@oxlint/binding-win32-ia32-msvc": "1.62.0",
96
+ "@oxlint/binding-linux-ppc64-gnu": "1.62.0",
97
+ "@oxlint/binding-linux-riscv64-gnu": "1.62.0",
98
+ "@oxlint/binding-linux-riscv64-musl": "1.62.0",
99
+ "@oxlint/binding-linux-s390x-gnu": "1.62.0",
100
+ "@oxlint/binding-darwin-x64": "1.62.0",
101
+ "@oxlint/binding-win32-x64-msvc": "1.62.0",
102
+ "@oxlint/binding-freebsd-x64": "1.62.0",
103
+ "@oxlint/binding-linux-x64-gnu": "1.62.0",
104
+ "@oxlint/binding-linux-x64-musl": "1.62.0"
105
105
  }
106
106
  }