oxlint 1.31.0 → 1.32.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.
@@ -339,7 +339,6 @@
339
339
  "react-perf",
340
340
  "promise",
341
341
  "node",
342
- "regex",
343
342
  "vue"
344
343
  ]
345
344
  },
@@ -661,4 +660,4 @@
661
660
  }
662
661
  },
663
662
  "markdownDescription": "Oxlint Configuration File\n\nThis configuration is aligned with ESLint v8's configuration schema (`eslintrc.json`).\n\nUsage: `oxlint -c oxlintrc.json --import-plugin`\n\n::: danger NOTE\n\nOnly the `.json` format is supported. You can use comments in configuration files.\n\n:::\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},\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```"
664
- }
663
+ }
package/dist/bindings.js CHANGED
@@ -36,7 +36,7 @@ function requireNative() {
36
36
  }
37
37
  try {
38
38
  let binding = require("@oxlint/android-arm64"), bindingPackageVersion = require("@oxlint/android-arm64/package.json").version;
39
- if (bindingPackageVersion !== "1.31.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.31.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
39
+ if (bindingPackageVersion !== "1.32.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.32.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
40
40
  return binding;
41
41
  } catch (e) {
42
42
  loadErrors.push(e);
@@ -49,7 +49,7 @@ function requireNative() {
49
49
  }
50
50
  try {
51
51
  let binding = require("@oxlint/android-arm-eabi"), bindingPackageVersion = require("@oxlint/android-arm-eabi/package.json").version;
52
- if (bindingPackageVersion !== "1.31.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.31.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
52
+ if (bindingPackageVersion !== "1.32.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.32.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
53
53
  return binding;
54
54
  } catch (e) {
55
55
  loadErrors.push(e);
@@ -63,7 +63,7 @@ function requireNative() {
63
63
  }
64
64
  try {
65
65
  let binding = require("@oxlint/win32-x64-gnu"), bindingPackageVersion = require("@oxlint/win32-x64-gnu/package.json").version;
66
- if (bindingPackageVersion !== "1.31.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.31.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
66
+ if (bindingPackageVersion !== "1.32.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.32.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
67
67
  return binding;
68
68
  } catch (e) {
69
69
  loadErrors.push(e);
@@ -76,7 +76,7 @@ function requireNative() {
76
76
  }
77
77
  try {
78
78
  let binding = require("@oxlint/win32-x64"), bindingPackageVersion = require("@oxlint/win32-x64/package.json").version;
79
- if (bindingPackageVersion !== "1.31.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.31.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
79
+ if (bindingPackageVersion !== "1.32.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.32.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
80
80
  return binding;
81
81
  } catch (e) {
82
82
  loadErrors.push(e);
@@ -90,7 +90,7 @@ function requireNative() {
90
90
  }
91
91
  try {
92
92
  let binding = require("@oxlint/win32-ia32"), bindingPackageVersion = require("@oxlint/win32-ia32/package.json").version;
93
- if (bindingPackageVersion !== "1.31.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.31.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
93
+ if (bindingPackageVersion !== "1.32.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.32.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
94
94
  return binding;
95
95
  } catch (e) {
96
96
  loadErrors.push(e);
@@ -103,7 +103,7 @@ function requireNative() {
103
103
  }
104
104
  try {
105
105
  let binding = require("@oxlint/win32-arm64"), bindingPackageVersion = require("@oxlint/win32-arm64/package.json").version;
106
- if (bindingPackageVersion !== "1.31.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.31.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
106
+ if (bindingPackageVersion !== "1.32.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.32.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
107
107
  return binding;
108
108
  } catch (e) {
109
109
  loadErrors.push(e);
@@ -117,7 +117,7 @@ function requireNative() {
117
117
  }
118
118
  try {
119
119
  let binding = require("@oxlint/darwin-universal"), bindingPackageVersion = require("@oxlint/darwin-universal/package.json").version;
120
- if (bindingPackageVersion !== "1.31.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.31.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
120
+ if (bindingPackageVersion !== "1.32.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.32.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
121
121
  return binding;
122
122
  } catch (e) {
123
123
  loadErrors.push(e);
@@ -130,7 +130,7 @@ function requireNative() {
130
130
  }
131
131
  try {
132
132
  let binding = require("@oxlint/darwin-x64"), bindingPackageVersion = require("@oxlint/darwin-x64/package.json").version;
133
- if (bindingPackageVersion !== "1.31.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.31.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
133
+ if (bindingPackageVersion !== "1.32.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.32.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
134
134
  return binding;
135
135
  } catch (e) {
136
136
  loadErrors.push(e);
@@ -143,7 +143,7 @@ function requireNative() {
143
143
  }
144
144
  try {
145
145
  let binding = require("@oxlint/darwin-arm64"), bindingPackageVersion = require("@oxlint/darwin-arm64/package.json").version;
146
- if (bindingPackageVersion !== "1.31.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.31.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
146
+ if (bindingPackageVersion !== "1.32.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.32.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
147
147
  return binding;
148
148
  } catch (e) {
149
149
  loadErrors.push(e);
@@ -157,7 +157,7 @@ function requireNative() {
157
157
  }
158
158
  try {
159
159
  let binding = require("@oxlint/freebsd-x64"), bindingPackageVersion = require("@oxlint/freebsd-x64/package.json").version;
160
- if (bindingPackageVersion !== "1.31.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.31.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
160
+ if (bindingPackageVersion !== "1.32.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.32.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
161
161
  return binding;
162
162
  } catch (e) {
163
163
  loadErrors.push(e);
@@ -170,7 +170,7 @@ function requireNative() {
170
170
  }
171
171
  try {
172
172
  let binding = require("@oxlint/freebsd-arm64"), bindingPackageVersion = require("@oxlint/freebsd-arm64/package.json").version;
173
- if (bindingPackageVersion !== "1.31.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.31.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
173
+ if (bindingPackageVersion !== "1.32.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.32.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
174
174
  return binding;
175
175
  } catch (e) {
176
176
  loadErrors.push(e);
@@ -184,7 +184,7 @@ function requireNative() {
184
184
  }
185
185
  try {
186
186
  let binding = require("@oxlint/linux-x64-musl"), bindingPackageVersion = require("@oxlint/linux-x64-musl/package.json").version;
187
- if (bindingPackageVersion !== "1.31.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.31.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
187
+ if (bindingPackageVersion !== "1.32.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.32.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
188
188
  return binding;
189
189
  } catch (e) {
190
190
  loadErrors.push(e);
@@ -197,7 +197,7 @@ function requireNative() {
197
197
  }
198
198
  try {
199
199
  let binding = require("@oxlint/linux-x64-gnu"), bindingPackageVersion = require("@oxlint/linux-x64-gnu/package.json").version;
200
- if (bindingPackageVersion !== "1.31.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.31.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
200
+ if (bindingPackageVersion !== "1.32.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.32.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
201
201
  return binding;
202
202
  } catch (e) {
203
203
  loadErrors.push(e);
@@ -211,7 +211,7 @@ function requireNative() {
211
211
  }
212
212
  try {
213
213
  let binding = require("@oxlint/linux-arm64-musl"), bindingPackageVersion = require("@oxlint/linux-arm64-musl/package.json").version;
214
- if (bindingPackageVersion !== "1.31.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.31.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
214
+ if (bindingPackageVersion !== "1.32.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.32.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
215
215
  return binding;
216
216
  } catch (e) {
217
217
  loadErrors.push(e);
@@ -224,7 +224,7 @@ function requireNative() {
224
224
  }
225
225
  try {
226
226
  let binding = require("@oxlint/linux-arm64-gnu"), bindingPackageVersion = require("@oxlint/linux-arm64-gnu/package.json").version;
227
- if (bindingPackageVersion !== "1.31.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.31.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
227
+ if (bindingPackageVersion !== "1.32.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.32.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
228
228
  return binding;
229
229
  } catch (e) {
230
230
  loadErrors.push(e);
@@ -238,7 +238,7 @@ function requireNative() {
238
238
  }
239
239
  try {
240
240
  let binding = require("@oxlint/linux-arm-musleabihf"), bindingPackageVersion = require("@oxlint/linux-arm-musleabihf/package.json").version;
241
- if (bindingPackageVersion !== "1.31.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.31.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
241
+ if (bindingPackageVersion !== "1.32.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.32.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
242
242
  return binding;
243
243
  } catch (e) {
244
244
  loadErrors.push(e);
@@ -251,7 +251,7 @@ function requireNative() {
251
251
  }
252
252
  try {
253
253
  let binding = require("@oxlint/linux-arm-gnueabihf"), bindingPackageVersion = require("@oxlint/linux-arm-gnueabihf/package.json").version;
254
- if (bindingPackageVersion !== "1.31.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.31.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
254
+ if (bindingPackageVersion !== "1.32.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.32.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
255
255
  return binding;
256
256
  } catch (e) {
257
257
  loadErrors.push(e);
@@ -265,7 +265,7 @@ function requireNative() {
265
265
  }
266
266
  try {
267
267
  let binding = require("@oxlint/linux-loong64-musl"), bindingPackageVersion = require("@oxlint/linux-loong64-musl/package.json").version;
268
- if (bindingPackageVersion !== "1.31.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.31.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
268
+ if (bindingPackageVersion !== "1.32.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.32.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
269
269
  return binding;
270
270
  } catch (e) {
271
271
  loadErrors.push(e);
@@ -278,7 +278,7 @@ function requireNative() {
278
278
  }
279
279
  try {
280
280
  let binding = require("@oxlint/linux-loong64-gnu"), bindingPackageVersion = require("@oxlint/linux-loong64-gnu/package.json").version;
281
- if (bindingPackageVersion !== "1.31.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.31.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
281
+ if (bindingPackageVersion !== "1.32.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.32.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
282
282
  return binding;
283
283
  } catch (e) {
284
284
  loadErrors.push(e);
@@ -292,7 +292,7 @@ function requireNative() {
292
292
  }
293
293
  try {
294
294
  let binding = require("@oxlint/linux-riscv64-musl"), bindingPackageVersion = require("@oxlint/linux-riscv64-musl/package.json").version;
295
- if (bindingPackageVersion !== "1.31.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.31.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
295
+ if (bindingPackageVersion !== "1.32.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.32.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
296
296
  return binding;
297
297
  } catch (e) {
298
298
  loadErrors.push(e);
@@ -305,7 +305,7 @@ function requireNative() {
305
305
  }
306
306
  try {
307
307
  let binding = require("@oxlint/linux-riscv64-gnu"), bindingPackageVersion = require("@oxlint/linux-riscv64-gnu/package.json").version;
308
- if (bindingPackageVersion !== "1.31.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.31.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
308
+ if (bindingPackageVersion !== "1.32.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.32.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
309
309
  return binding;
310
310
  } catch (e) {
311
311
  loadErrors.push(e);
@@ -319,7 +319,7 @@ function requireNative() {
319
319
  }
320
320
  try {
321
321
  let binding = require("@oxlint/linux-ppc64-gnu"), bindingPackageVersion = require("@oxlint/linux-ppc64-gnu/package.json").version;
322
- if (bindingPackageVersion !== "1.31.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.31.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
322
+ if (bindingPackageVersion !== "1.32.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.32.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
323
323
  return binding;
324
324
  } catch (e) {
325
325
  loadErrors.push(e);
@@ -332,7 +332,7 @@ function requireNative() {
332
332
  }
333
333
  try {
334
334
  let binding = require("@oxlint/linux-s390x-gnu"), bindingPackageVersion = require("@oxlint/linux-s390x-gnu/package.json").version;
335
- if (bindingPackageVersion !== "1.31.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.31.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
335
+ if (bindingPackageVersion !== "1.32.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.32.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
336
336
  return binding;
337
337
  } catch (e) {
338
338
  loadErrors.push(e);
@@ -346,7 +346,7 @@ function requireNative() {
346
346
  }
347
347
  try {
348
348
  let binding = require("@oxlint/openharmony-arm64"), bindingPackageVersion = require("@oxlint/openharmony-arm64/package.json").version;
349
- if (bindingPackageVersion !== "1.31.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.31.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
349
+ if (bindingPackageVersion !== "1.32.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.32.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
350
350
  return binding;
351
351
  } catch (e) {
352
352
  loadErrors.push(e);
@@ -359,7 +359,7 @@ function requireNative() {
359
359
  }
360
360
  try {
361
361
  let binding = require("@oxlint/openharmony-x64"), bindingPackageVersion = require("@oxlint/openharmony-x64/package.json").version;
362
- if (bindingPackageVersion !== "1.31.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.31.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
362
+ if (bindingPackageVersion !== "1.32.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.32.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
363
363
  return binding;
364
364
  } catch (e) {
365
365
  loadErrors.push(e);
@@ -372,7 +372,7 @@ function requireNative() {
372
372
  }
373
373
  try {
374
374
  let binding = require("@oxlint/openharmony-arm"), bindingPackageVersion = require("@oxlint/openharmony-arm/package.json").version;
375
- if (bindingPackageVersion !== "1.31.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.31.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
375
+ if (bindingPackageVersion !== "1.32.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.32.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
376
376
  return binding;
377
377
  } catch (e) {
378
378
  loadErrors.push(e);
package/dist/cli.js CHANGED
@@ -6,8 +6,8 @@ function loadPluginWrapper(path, packageName) {
6
6
  function setupConfigsWrapper(optionsJSON) {
7
7
  setupConfigs(optionsJSON);
8
8
  }
9
- function lintFileWrapper(filePath, bufferId, buffer, ruleIds, optionsIds, settingsJSON) {
10
- return lintFile(filePath, bufferId, buffer, ruleIds, optionsIds, settingsJSON);
9
+ function lintFileWrapper(filePath, bufferId, buffer, ruleIds, optionsIds, settingsJSON, globalsJSON) {
10
+ return lintFile(filePath, bufferId, buffer, ruleIds, optionsIds, settingsJSON, globalsJSON);
11
11
  }
12
12
  await lint(process.argv.slice(2), loadPluginWrapper, setupConfigsWrapper, lintFileWrapper) || (process.exitCode = 1);
13
13
  export {};
package/dist/index.d.ts CHANGED
@@ -1,3 +1,12 @@
1
+ //#region src-js/plugins/globals.d.ts
2
+ /**
3
+ * Globals for the file being linted.
4
+ *
5
+ * Globals are deserialized from JSON, so can only contain JSON-compatible values.
6
+ * Each global variable maps to "readonly", "writable", or "off".
7
+ */
8
+ type Globals = Record<string, "readonly" | "writable" | "off">;
9
+ //#endregion
1
10
  //#region src-js/plugins/json.d.ts
2
11
  /**
3
12
  * A JSON value.
@@ -833,25 +842,17 @@ interface RangeOptions {
833
842
  /**
834
843
  * Filter function, passed as `filter` property of `SkipOptions` and `CountOptions`.
835
844
  */
836
- type FilterFn = (token: Token) => boolean;
845
+ type FilterFn = (token: TokenOrComment) => boolean;
837
846
  /**
838
847
  * AST token type.
839
848
  */
840
- type Token = BooleanToken | CommentToken | IdentifierToken | JSXIdentifierToken | JSXTextToken | KeywordToken | NullToken | NumericToken | PrivateIdentifierToken | PunctuatorToken | RegularExpressionToken | StringToken | TemplateToken;
849
+ type Token = BooleanToken | IdentifierToken | JSXIdentifierToken | JSXTextToken | KeywordToken | NullToken | NumericToken | PrivateIdentifierToken | PunctuatorToken | RegularExpressionToken | StringToken | TemplateToken;
841
850
  interface BaseToken extends Omit<Span, "start" | "end"> {
842
- type: Token["type"];
843
851
  value: string;
844
852
  }
845
853
  interface BooleanToken extends BaseToken {
846
854
  type: "Boolean";
847
855
  }
848
- type CommentToken = BlockCommentToken | LineCommentToken;
849
- interface BlockCommentToken extends BaseToken {
850
- type: "Block";
851
- }
852
- interface LineCommentToken extends BaseToken {
853
- type: "Line";
854
- }
855
856
  interface IdentifierToken extends BaseToken {
856
857
  type: "Identifier";
857
858
  }
@@ -889,6 +890,10 @@ interface StringToken extends BaseToken {
889
890
  interface TemplateToken extends BaseToken {
890
891
  type: "Template";
891
892
  }
893
+ interface CommentToken extends BaseToken {
894
+ type: "Line" | "Block";
895
+ }
896
+ type TokenOrComment = Token | CommentToken;
892
897
  /**
893
898
  * Get all tokens that are related to the given node.
894
899
  * @param node - The AST node.
@@ -902,7 +907,7 @@ interface TemplateToken extends BaseToken {
902
907
  * @param afterCount? - The number of tokens after the node to retrieve.
903
908
  * @returns Array of `Token`s.
904
909
  */
905
- declare function getTokens(node: Node, countOptions?: CountOptions | number | FilterFn | null, afterCount?: number | null): Token[];
910
+ declare function getTokens(node: Node, countOptions?: CountOptions | number | FilterFn | null, afterCount?: number | null): TokenOrComment[];
906
911
  /**
907
912
  * Get the first token of the given node.
908
913
  * @param node - The AST node.
@@ -911,7 +916,7 @@ declare function getTokens(node: Node, countOptions?: CountOptions | number | Fi
911
916
  * If is a function, equivalent to `{ filter: fn }`.
912
917
  * @returns `Token`, or `null` if all were skipped.
913
918
  */
914
- declare function getFirstToken(node: Node, skipOptions?: SkipOptions | number | FilterFn | null): Token | null;
919
+ declare function getFirstToken(node: Node, skipOptions?: SkipOptions | number | FilterFn | null): TokenOrComment | null;
915
920
  /**
916
921
  * Get the first tokens of the given node.
917
922
  * @param node - The AST node.
@@ -920,7 +925,7 @@ declare function getFirstToken(node: Node, skipOptions?: SkipOptions | number |
920
925
  * If is a function, equivalent to `{ filter: fn }`.
921
926
  * @returns Array of `Token`s.
922
927
  */
923
- declare function getFirstTokens(node: Node, countOptions?: CountOptions | number | FilterFn | null): Token[];
928
+ declare function getFirstTokens(node: Node, countOptions?: CountOptions | number | FilterFn | null): TokenOrComment[];
924
929
  /**
925
930
  * Get the last token of the given node.
926
931
  * @param node - The AST node.
@@ -929,7 +934,7 @@ declare function getFirstTokens(node: Node, countOptions?: CountOptions | number
929
934
  * If is a function, equivalent to `{ filter: fn }`.
930
935
  * @returns `Token`, or `null` if all were skipped.
931
936
  */
932
- declare function getLastToken(node: Node, skipOptions?: SkipOptions | number | FilterFn | null): Token | null;
937
+ declare function getLastToken(node: Node, skipOptions?: SkipOptions | number | FilterFn | null): TokenOrComment | null;
933
938
  /**
934
939
  * Get the last tokens of the given node.
935
940
  * @param node - The AST node.
@@ -938,7 +943,7 @@ declare function getLastToken(node: Node, skipOptions?: SkipOptions | number | F
938
943
  * If is a function, equivalent to `{ filter: fn }`.
939
944
  * @returns Array of `Token`s.
940
945
  */
941
- declare function getLastTokens(node: Node, countOptions?: CountOptions | number | FilterFn | null): Token[];
946
+ declare function getLastTokens(node: Node, countOptions?: CountOptions | number | FilterFn | null): TokenOrComment[];
942
947
  /**
943
948
  * Get the token that precedes a given node or token.
944
949
  * @param nodeOrToken - The AST node or token.
@@ -947,7 +952,7 @@ declare function getLastTokens(node: Node, countOptions?: CountOptions | number
947
952
  * If is a function, equivalent to `{ filter: fn }`.
948
953
  * @returns `Token`, or `null` if all were skipped.
949
954
  */
950
- declare function getTokenBefore(nodeOrToken: NodeOrToken | Comment, skipOptions?: SkipOptions | number | FilterFn | null): Token | null;
955
+ declare function getTokenBefore(nodeOrToken: NodeOrToken | Comment, skipOptions?: SkipOptions | number | FilterFn | null): TokenOrComment | null;
951
956
  /**
952
957
  * Get the token that precedes a given node or token.
953
958
  *
@@ -957,7 +962,7 @@ declare function getTokenBefore(nodeOrToken: NodeOrToken | Comment, skipOptions?
957
962
  * @param skip - Number of tokens to skip.
958
963
  * @returns `Token`, or `null` if all were skipped.
959
964
  */
960
- declare function getTokenOrCommentBefore(nodeOrToken: NodeOrToken | Comment, skip?: number): Token | null;
965
+ declare function getTokenOrCommentBefore(nodeOrToken: NodeOrToken | Comment, skip?: number): TokenOrComment | null;
961
966
  /**
962
967
  * Get the tokens that precede a given node or token.
963
968
  * @param nodeOrToken - The AST node or token.
@@ -966,7 +971,7 @@ declare function getTokenOrCommentBefore(nodeOrToken: NodeOrToken | Comment, ski
966
971
  * If is a function, equivalent to `{ filter: fn }`.
967
972
  * @returns Array of `Token`s.
968
973
  */
969
- declare function getTokensBefore(nodeOrToken: NodeOrToken | Comment, countOptions?: CountOptions | number | FilterFn | null): Token[];
974
+ declare function getTokensBefore(nodeOrToken: NodeOrToken | Comment, countOptions?: CountOptions | number | FilterFn | null): TokenOrComment[];
970
975
  /**
971
976
  * Get the token that follows a given node or token.
972
977
  * @param nodeOrToken - The AST node or token.
@@ -975,7 +980,7 @@ declare function getTokensBefore(nodeOrToken: NodeOrToken | Comment, countOption
975
980
  * If is a function, equivalent to `{ filter: fn }`.
976
981
  * @returns `Token`, or `null` if all were skipped.
977
982
  */
978
- declare function getTokenAfter(nodeOrToken: NodeOrToken | Comment, skipOptions?: SkipOptions | number | FilterFn | null): Token | null;
983
+ declare function getTokenAfter(nodeOrToken: NodeOrToken | Comment, skipOptions?: SkipOptions | number | FilterFn | null): TokenOrComment | null;
979
984
  /**
980
985
  * Get the token that follows a given node or token.
981
986
  *
@@ -985,7 +990,7 @@ declare function getTokenAfter(nodeOrToken: NodeOrToken | Comment, skipOptions?:
985
990
  * @param skip - Number of tokens to skip.
986
991
  * @returns `Token`, or `null` if all were skipped.
987
992
  */
988
- declare function getTokenOrCommentAfter(nodeOrToken: NodeOrToken | Comment, skip?: number): Token | null;
993
+ declare function getTokenOrCommentAfter(nodeOrToken: NodeOrToken | Comment, skip?: number): TokenOrComment | null;
989
994
  /**
990
995
  * Get the tokens that follow a given node or token.
991
996
  * @param nodeOrToken - The AST node or token.
@@ -994,7 +999,7 @@ declare function getTokenOrCommentAfter(nodeOrToken: NodeOrToken | Comment, skip
994
999
  * If is a function, equivalent to `{ filter: fn }`.
995
1000
  * @returns Array of `Token`s.
996
1001
  */
997
- declare function getTokensAfter(nodeOrToken: NodeOrToken | Comment, countOptions?: CountOptions | number | FilterFn | null): Token[];
1002
+ declare function getTokensAfter(nodeOrToken: NodeOrToken | Comment, countOptions?: CountOptions | number | FilterFn | null): TokenOrComment[];
998
1003
  /**
999
1004
  * Get all of the tokens between two non-overlapping nodes.
1000
1005
  * @param left - Node or token before the desired token range.
@@ -1009,7 +1014,7 @@ declare function getTokensAfter(nodeOrToken: NodeOrToken | Comment, countOptions
1009
1014
  * @param padding - Number of extra tokens on either side of center.
1010
1015
  * @returns Array of `Token`s between `left` and `right`.
1011
1016
  */
1012
- declare function getTokensBetween(left: NodeOrToken | Comment, right: NodeOrToken | Comment, countOptions?: CountOptions | number | FilterFn | null): Token[];
1017
+ declare function getTokensBetween(left: NodeOrToken | Comment, right: NodeOrToken | Comment, countOptions?: CountOptions | number | FilterFn | null): TokenOrComment[];
1013
1018
  /**
1014
1019
  * Get the first token between two non-overlapping nodes.
1015
1020
  * @param left - Node or token before the desired token range.
@@ -1019,7 +1024,7 @@ declare function getTokensBetween(left: NodeOrToken | Comment, right: NodeOrToke
1019
1024
  * If is a function, equivalent to `{ filter: fn }`.
1020
1025
  * @returns `Token`, or `null` if all were skipped.
1021
1026
  */
1022
- declare function getFirstTokenBetween(left: NodeOrToken | Comment, right: NodeOrToken | Comment, skipOptions?: SkipOptions | number | FilterFn | null): Token | null;
1027
+ declare function getFirstTokenBetween(left: NodeOrToken | Comment, right: NodeOrToken | Comment, skipOptions?: SkipOptions | number | FilterFn | null): TokenOrComment | null;
1023
1028
  /**
1024
1029
  * Get the first tokens between two non-overlapping nodes.
1025
1030
  * @param left - Node or token before the desired token range.
@@ -1029,7 +1034,7 @@ declare function getFirstTokenBetween(left: NodeOrToken | Comment, right: NodeOr
1029
1034
  * If is a function, equivalent to `{ filter: fn }`.
1030
1035
  * @returns Array of `Token`s between `left` and `right`.
1031
1036
  */
1032
- declare function getFirstTokensBetween(left: NodeOrToken | Comment, right: NodeOrToken | Comment, countOptions?: CountOptions | number | FilterFn | null): Token[];
1037
+ declare function getFirstTokensBetween(left: NodeOrToken | Comment, right: NodeOrToken | Comment, countOptions?: CountOptions | number | FilterFn | null): TokenOrComment[];
1033
1038
  /**
1034
1039
  * Get the last token between two non-overlapping nodes.
1035
1040
  * @param left - Node or token before the desired token range.
@@ -1039,7 +1044,7 @@ declare function getFirstTokensBetween(left: NodeOrToken | Comment, right: NodeO
1039
1044
  * If is a function, equivalent to `{ filter: fn }`.
1040
1045
  * @returns `Token`, or `null` if all were skipped.
1041
1046
  */
1042
- declare function getLastTokenBetween(left: NodeOrToken | Comment, right: NodeOrToken | Comment, skipOptions?: SkipOptions | number | FilterFn | null): Token | null;
1047
+ declare function getLastTokenBetween(left: NodeOrToken | Comment, right: NodeOrToken | Comment, skipOptions?: SkipOptions | number | FilterFn | null): TokenOrComment | null;
1043
1048
  /**
1044
1049
  * Get the last tokens between two non-overlapping nodes.
1045
1050
  * @param left - Node or token before the desired token range.
@@ -1049,14 +1054,14 @@ declare function getLastTokenBetween(left: NodeOrToken | Comment, right: NodeOrT
1049
1054
  * If is a function, equivalent to `{ filter: fn }`.
1050
1055
  * @returns Array of `Token`s between `left` and `right`.
1051
1056
  */
1052
- declare function getLastTokensBetween(left: NodeOrToken | Comment, right: NodeOrToken | Comment, countOptions?: CountOptions | number | FilterFn | null): Token[];
1057
+ declare function getLastTokensBetween(left: NodeOrToken | Comment, right: NodeOrToken | Comment, countOptions?: CountOptions | number | FilterFn | null): TokenOrComment[];
1053
1058
  /**
1054
1059
  * Get the token starting at the specified index.
1055
1060
  * @param index - Index of the start of the token's range.
1056
1061
  * @param rangeOptions - Options object.
1057
1062
  * @returns The token starting at index, or `null` if no such token.
1058
1063
  */
1059
- declare function getTokenByRangeStart(index: number, rangeOptions?: RangeOptions | null): Token | null;
1064
+ declare function getTokenByRangeStart(index: number, rangeOptions?: RangeOptions | null): TokenOrComment | null;
1060
1065
  /**
1061
1066
  * Determine if two nodes or tokens have at least one whitespace character between them.
1062
1067
  * Order does not matter.
@@ -2736,7 +2741,7 @@ type VisitorWithHooks = VisitorObject & {
2736
2741
  after?: AfterHook;
2737
2742
  };
2738
2743
  interface Node extends Span {}
2739
- type NodeOrToken = Node | Token;
2744
+ type NodeOrToken = Node | Token | CommentToken;
2740
2745
  interface Comment extends Span {
2741
2746
  type: "Line" | "Block";
2742
2747
  value: string;
@@ -3035,13 +3040,47 @@ declare function markVariableAsUsed(name: string, refNode: Node$1): boolean;
3035
3040
  //#endregion
3036
3041
  //#region src-js/plugins/source_code.d.ts
3037
3042
  declare const SOURCE_CODE: Readonly<{
3043
+ /**
3044
+ * Source text.
3045
+ */
3038
3046
  readonly text: string;
3047
+ /**
3048
+ * `true` if file has Unicode BOM.
3049
+ */
3039
3050
  readonly hasBOM: boolean;
3051
+ /**
3052
+ * AST of the file.
3053
+ */
3040
3054
  readonly ast: Program;
3055
+ /**
3056
+ * `true` if the AST is in ESTree format.
3057
+ */
3058
+ isESTree: true;
3059
+ /**
3060
+ * `ScopeManager` for the file.
3061
+ */
3041
3062
  readonly scopeManager: ScopeManager;
3063
+ /**
3064
+ * Visitor keys to traverse this AST.
3065
+ */
3042
3066
  readonly visitorKeys: Readonly<Record<string, readonly string[]>>;
3067
+ /**
3068
+ * Parser services for the file.
3069
+ */
3043
3070
  readonly parserServices: Record<string, unknown>;
3071
+ /**
3072
+ * Source text as array of lines, split according to specification's definition of line breaks.
3073
+ */
3044
3074
  readonly lines: string[];
3075
+ /**
3076
+ * Character offset of the first character of each line in source text,
3077
+ * split according to specification's definition of line breaks.
3078
+ */
3079
+ readonly lineStartIndices: number[];
3080
+ /**
3081
+ * Array of all tokens and comments in the file, in source order.
3082
+ */
3083
+ readonly tokensAndComments: (Token | CommentToken)[];
3045
3084
  /**
3046
3085
  * Get the source code for the given node.
3047
3086
  * @param node? - The AST node to get the text for.
@@ -3316,7 +3355,7 @@ declare const LANGUAGE_OPTIONS: Readonly<{
3316
3355
  /**
3317
3356
  * Globals defined for the file being linted.
3318
3357
  */
3319
- readonly globals: Record<string, "readonly" | "writable" | "off"> | null;
3358
+ readonly globals: Readonly<Globals> | null;
3320
3359
  }>;
3321
3360
  /**
3322
3361
  * Language options used when parsing a file.
@@ -3646,7 +3685,14 @@ type ItFn = ((text: string, fn: () => void) => void) & {
3646
3685
  /**
3647
3686
  * Configuration for `RuleTester`.
3648
3687
  */
3649
- type Config = Record<string, unknown>;
3688
+ interface Config {
3689
+ /**
3690
+ * ESLint compatibility mode.
3691
+ * If `true`, column offsets in diagnostics are incremented by 1, to match ESLint's behavior.
3692
+ */
3693
+ eslintCompat?: boolean;
3694
+ [key: string]: unknown;
3695
+ }
3650
3696
  /**
3651
3697
  * Test case.
3652
3698
  */
@@ -3658,6 +3704,11 @@ interface TestCase {
3658
3704
  options?: Options;
3659
3705
  before?: (this: this) => void;
3660
3706
  after?: (this: this) => void;
3707
+ /**
3708
+ * `true` to enable ESLint compatibility mode.
3709
+ * See `Config` type.
3710
+ */
3711
+ eslintCompat?: boolean;
3661
3712
  }
3662
3713
  /**
3663
3714
  * Test case for valid code.
@@ -3691,16 +3742,70 @@ interface TestCases {
3691
3742
  valid: (ValidTestCase | string)[];
3692
3743
  invalid: InvalidTestCase[];
3693
3744
  }
3694
- //#endregion
3695
- //#region src-js/index.d.ts
3745
+ /**
3746
+ * Utility class for testing rules.
3747
+ */
3748
+ declare class RuleTester {
3749
+ #private;
3750
+ /**
3751
+ * Creates a new instance of RuleTester.
3752
+ * @param config? - Extra configuration for the tester (optional)
3753
+ */
3754
+ constructor(config?: Config);
3755
+ /**
3756
+ * Set the configuration to use for all future tests.
3757
+ * @param config - The configuration to use
3758
+ * @throws {TypeError} If `config` is not an object
3759
+ */
3760
+ static setDefaultConfig(config: Config): void;
3761
+ /**
3762
+ * Get the current configuration used for all tests.
3763
+ * @returns The current configuration
3764
+ */
3765
+ static getDefaultConfig(): Config;
3766
+ /**
3767
+ * Reset the configuration to the initial configuration of the tester removing
3768
+ * any changes made until now.
3769
+ * @returns {void}
3770
+ */
3771
+ static resetDefaultConfig(): void;
3772
+ static get describe(): DescribeFn;
3773
+ static set describe(value: DescribeFn);
3774
+ static get it(): ItFn;
3775
+ static set it(value: ItFn);
3776
+ static get itOnly(): ItFn;
3777
+ static set itOnly(value: ItFn);
3778
+ /**
3779
+ * Add the `only` property to a test to run it in isolation.
3780
+ * @param item - A single test to run by itself
3781
+ * @returns The test with `only` set
3782
+ */
3783
+ static only(item: string | TestCase): TestCase;
3784
+ /**
3785
+ * Adds a new rule test to execute.
3786
+ * @param ruleName - Name of the rule to run
3787
+ * @param rule - Rule to test
3788
+ * @param tests - Collection of tests to run
3789
+ * @throws {TypeError|Error} If `rule` is not an object with a `create` method,
3790
+ * or if non-object `test`, or if a required scenario of the given type is missing
3791
+ */
3792
+ run(ruleName: string, rule: Rule, tests: TestCases): void;
3793
+ }
3794
+ type _Config = Config;
3795
+ type _DescribeFn = DescribeFn;
3796
+ type _ItFn = ItFn;
3797
+ type _ValidTestCase = ValidTestCase;
3798
+ type _InvalidTestCase = InvalidTestCase;
3799
+ type _TestCases = TestCases;
3800
+ type _Error = Error;
3696
3801
  declare namespace RuleTester {
3697
- type Config = Config;
3698
- type DescribeFn = DescribeFn;
3699
- type ItFn = ItFn;
3700
- type ValidTestCase = ValidTestCase;
3701
- type InvalidTestCase = InvalidTestCase;
3702
- type TestCases = TestCases;
3703
- type Error = Error;
3802
+ type Config = _Config;
3803
+ type DescribeFn = _DescribeFn;
3804
+ type ItFn = _ItFn;
3805
+ type ValidTestCase = _ValidTestCase;
3806
+ type InvalidTestCase = _InvalidTestCase;
3807
+ type TestCases = _TestCases;
3808
+ type Error = _Error;
3704
3809
  }
3705
3810
  //#endregion
3706
- export { type AfterHook, type BeforeHook, type BlockCommentToken, type BooleanToken, type Comment, type CommentToken, type Context, type CountOptions, type CreateOnceRule, type CreateRule, type Definition, type DefinitionType, type Diagnostic, type DiagnosticData, type types_d_exports as ESTree, type FilterFn, type Fix, type FixFn, type Fixer, type IdentifierToken, type JSXIdentifierToken, type JSXTextToken, type KeywordToken, type LanguageOptions, type LineColumn, type LineCommentToken, type Location, type Node, type NodeOrToken, type NullToken, type NumericToken, type Options, type Plugin, type PrivateIdentifierToken, type PunctuatorToken, type Range, type RangeOptions, type Ranged, type Reference, type RegularExpressionToken, type Rule, type RuleDeprecatedInfo, type RuleDocs, type RuleMeta, type RuleOptionsSchema, type RuleReplacedByExternalSpecifier, type RuleReplacedByInfo, RuleTester, type Scope, type ScopeManager, type ScopeType, type Settings, type SkipOptions, type SourceCode, type Span, type StringToken, type Suggestion, type TemplateToken, type Token, type Variable, type VisitorObject as Visitor, type VisitorWithHooks, definePlugin, defineRule };
3811
+ export { type AfterHook, type BeforeHook, type BooleanToken, type Comment, type CommentToken, type Context, type CountOptions, type CreateOnceRule, type CreateRule, type Definition, type DefinitionType, type Diagnostic, type DiagnosticData, type types_d_exports as ESTree, type FilterFn, type Fix, type FixFn, type Fixer, type IdentifierToken, type JSXIdentifierToken, type JSXTextToken, type KeywordToken, type LanguageOptions, type LineColumn, type Location, type Node, type NodeOrToken, type NullToken, type NumericToken, type Options, type Plugin, type PrivateIdentifierToken, type PunctuatorToken, type Range, type RangeOptions, type Ranged, type Reference, type RegularExpressionToken, type Rule, type RuleDeprecatedInfo, type RuleDocs, type RuleMeta, type RuleOptionsSchema, type RuleReplacedByExternalSpecifier, type RuleReplacedByInfo, RuleTester, type Scope, type ScopeManager, type ScopeType, type Settings, type SkipOptions, type SourceCode, type Span, type StringToken, type Suggestion, type TemplateToken, type Token, type Variable, type VisitorObject as Visitor, type VisitorWithHooks, definePlugin, defineRule };