oxlint 1.72.0 → 1.74.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/configuration_schema.json +272 -24
- package/dist/bindings.js +26 -26
- package/dist/index.d.ts +105 -9
- package/dist/lint.js +32 -32
- package/dist/plugins-dev.d.ts +61 -104
- package/dist/plugins-dev.js +1 -1
- package/package.json +21 -21
package/dist/bindings.js
CHANGED
|
@@ -37,7 +37,7 @@ function requireNative() {
|
|
|
37
37
|
}
|
|
38
38
|
try {
|
|
39
39
|
let binding = require("@oxlint/binding-android-arm64"), bindingPackageVersion = require("@oxlint/binding-android-arm64/package.json").version;
|
|
40
|
-
if (bindingPackageVersion !== "1.
|
|
40
|
+
if (bindingPackageVersion !== "1.74.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.74.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
41
41
|
return binding;
|
|
42
42
|
} catch (e) {
|
|
43
43
|
loadErrors.push(e);
|
|
@@ -50,7 +50,7 @@ function requireNative() {
|
|
|
50
50
|
}
|
|
51
51
|
try {
|
|
52
52
|
let binding = require("@oxlint/binding-android-arm-eabi"), bindingPackageVersion = require("@oxlint/binding-android-arm-eabi/package.json").version;
|
|
53
|
-
if (bindingPackageVersion !== "1.
|
|
53
|
+
if (bindingPackageVersion !== "1.74.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.74.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
54
54
|
return binding;
|
|
55
55
|
} catch (e) {
|
|
56
56
|
loadErrors.push(e);
|
|
@@ -64,7 +64,7 @@ function requireNative() {
|
|
|
64
64
|
}
|
|
65
65
|
try {
|
|
66
66
|
let binding = require("@oxlint/binding-win32-x64-gnu"), bindingPackageVersion = require("@oxlint/binding-win32-x64-gnu/package.json").version;
|
|
67
|
-
if (bindingPackageVersion !== "1.
|
|
67
|
+
if (bindingPackageVersion !== "1.74.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.74.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
68
68
|
return binding;
|
|
69
69
|
} catch (e) {
|
|
70
70
|
loadErrors.push(e);
|
|
@@ -77,7 +77,7 @@ function requireNative() {
|
|
|
77
77
|
}
|
|
78
78
|
try {
|
|
79
79
|
let binding = require("@oxlint/binding-win32-x64-msvc"), bindingPackageVersion = require("@oxlint/binding-win32-x64-msvc/package.json").version;
|
|
80
|
-
if (bindingPackageVersion !== "1.
|
|
80
|
+
if (bindingPackageVersion !== "1.74.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.74.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
81
81
|
return binding;
|
|
82
82
|
} catch (e) {
|
|
83
83
|
loadErrors.push(e);
|
|
@@ -91,7 +91,7 @@ function requireNative() {
|
|
|
91
91
|
}
|
|
92
92
|
try {
|
|
93
93
|
let binding = require("@oxlint/binding-win32-ia32-msvc"), bindingPackageVersion = require("@oxlint/binding-win32-ia32-msvc/package.json").version;
|
|
94
|
-
if (bindingPackageVersion !== "1.
|
|
94
|
+
if (bindingPackageVersion !== "1.74.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.74.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
95
95
|
return binding;
|
|
96
96
|
} catch (e) {
|
|
97
97
|
loadErrors.push(e);
|
|
@@ -104,7 +104,7 @@ function requireNative() {
|
|
|
104
104
|
}
|
|
105
105
|
try {
|
|
106
106
|
let binding = require("@oxlint/binding-win32-arm64-msvc"), bindingPackageVersion = require("@oxlint/binding-win32-arm64-msvc/package.json").version;
|
|
107
|
-
if (bindingPackageVersion !== "1.
|
|
107
|
+
if (bindingPackageVersion !== "1.74.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.74.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
108
108
|
return binding;
|
|
109
109
|
} catch (e) {
|
|
110
110
|
loadErrors.push(e);
|
|
@@ -118,7 +118,7 @@ function requireNative() {
|
|
|
118
118
|
}
|
|
119
119
|
try {
|
|
120
120
|
let binding = require("@oxlint/binding-darwin-universal"), bindingPackageVersion = require("@oxlint/binding-darwin-universal/package.json").version;
|
|
121
|
-
if (bindingPackageVersion !== "1.
|
|
121
|
+
if (bindingPackageVersion !== "1.74.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.74.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
122
122
|
return binding;
|
|
123
123
|
} catch (e) {
|
|
124
124
|
loadErrors.push(e);
|
|
@@ -131,7 +131,7 @@ function requireNative() {
|
|
|
131
131
|
}
|
|
132
132
|
try {
|
|
133
133
|
let binding = require("@oxlint/binding-darwin-x64"), bindingPackageVersion = require("@oxlint/binding-darwin-x64/package.json").version;
|
|
134
|
-
if (bindingPackageVersion !== "1.
|
|
134
|
+
if (bindingPackageVersion !== "1.74.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.74.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
135
135
|
return binding;
|
|
136
136
|
} catch (e) {
|
|
137
137
|
loadErrors.push(e);
|
|
@@ -144,7 +144,7 @@ function requireNative() {
|
|
|
144
144
|
}
|
|
145
145
|
try {
|
|
146
146
|
let binding = require("@oxlint/binding-darwin-arm64"), bindingPackageVersion = require("@oxlint/binding-darwin-arm64/package.json").version;
|
|
147
|
-
if (bindingPackageVersion !== "1.
|
|
147
|
+
if (bindingPackageVersion !== "1.74.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.74.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
148
148
|
return binding;
|
|
149
149
|
} catch (e) {
|
|
150
150
|
loadErrors.push(e);
|
|
@@ -158,7 +158,7 @@ function requireNative() {
|
|
|
158
158
|
}
|
|
159
159
|
try {
|
|
160
160
|
let binding = require("@oxlint/binding-freebsd-x64"), bindingPackageVersion = require("@oxlint/binding-freebsd-x64/package.json").version;
|
|
161
|
-
if (bindingPackageVersion !== "1.
|
|
161
|
+
if (bindingPackageVersion !== "1.74.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.74.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
162
162
|
return binding;
|
|
163
163
|
} catch (e) {
|
|
164
164
|
loadErrors.push(e);
|
|
@@ -171,7 +171,7 @@ function requireNative() {
|
|
|
171
171
|
}
|
|
172
172
|
try {
|
|
173
173
|
let binding = require("@oxlint/binding-freebsd-arm64"), bindingPackageVersion = require("@oxlint/binding-freebsd-arm64/package.json").version;
|
|
174
|
-
if (bindingPackageVersion !== "1.
|
|
174
|
+
if (bindingPackageVersion !== "1.74.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.74.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
175
175
|
return binding;
|
|
176
176
|
} catch (e) {
|
|
177
177
|
loadErrors.push(e);
|
|
@@ -185,7 +185,7 @@ function requireNative() {
|
|
|
185
185
|
}
|
|
186
186
|
try {
|
|
187
187
|
let binding = require("@oxlint/binding-linux-x64-musl"), bindingPackageVersion = require("@oxlint/binding-linux-x64-musl/package.json").version;
|
|
188
|
-
if (bindingPackageVersion !== "1.
|
|
188
|
+
if (bindingPackageVersion !== "1.74.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.74.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
189
189
|
return binding;
|
|
190
190
|
} catch (e) {
|
|
191
191
|
loadErrors.push(e);
|
|
@@ -198,7 +198,7 @@ function requireNative() {
|
|
|
198
198
|
}
|
|
199
199
|
try {
|
|
200
200
|
let binding = require("@oxlint/binding-linux-x64-gnu"), bindingPackageVersion = require("@oxlint/binding-linux-x64-gnu/package.json").version;
|
|
201
|
-
if (bindingPackageVersion !== "1.
|
|
201
|
+
if (bindingPackageVersion !== "1.74.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.74.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
202
202
|
return binding;
|
|
203
203
|
} catch (e) {
|
|
204
204
|
loadErrors.push(e);
|
|
@@ -212,7 +212,7 @@ function requireNative() {
|
|
|
212
212
|
}
|
|
213
213
|
try {
|
|
214
214
|
let binding = require("@oxlint/binding-linux-arm64-musl"), bindingPackageVersion = require("@oxlint/binding-linux-arm64-musl/package.json").version;
|
|
215
|
-
if (bindingPackageVersion !== "1.
|
|
215
|
+
if (bindingPackageVersion !== "1.74.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.74.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
216
216
|
return binding;
|
|
217
217
|
} catch (e) {
|
|
218
218
|
loadErrors.push(e);
|
|
@@ -225,7 +225,7 @@ function requireNative() {
|
|
|
225
225
|
}
|
|
226
226
|
try {
|
|
227
227
|
let binding = require("@oxlint/binding-linux-arm64-gnu"), bindingPackageVersion = require("@oxlint/binding-linux-arm64-gnu/package.json").version;
|
|
228
|
-
if (bindingPackageVersion !== "1.
|
|
228
|
+
if (bindingPackageVersion !== "1.74.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.74.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
229
229
|
return binding;
|
|
230
230
|
} catch (e) {
|
|
231
231
|
loadErrors.push(e);
|
|
@@ -239,7 +239,7 @@ function requireNative() {
|
|
|
239
239
|
}
|
|
240
240
|
try {
|
|
241
241
|
let binding = require("@oxlint/binding-linux-arm-musleabihf"), bindingPackageVersion = require("@oxlint/binding-linux-arm-musleabihf/package.json").version;
|
|
242
|
-
if (bindingPackageVersion !== "1.
|
|
242
|
+
if (bindingPackageVersion !== "1.74.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.74.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
243
243
|
return binding;
|
|
244
244
|
} catch (e) {
|
|
245
245
|
loadErrors.push(e);
|
|
@@ -252,7 +252,7 @@ function requireNative() {
|
|
|
252
252
|
}
|
|
253
253
|
try {
|
|
254
254
|
let binding = require("@oxlint/binding-linux-arm-gnueabihf"), bindingPackageVersion = require("@oxlint/binding-linux-arm-gnueabihf/package.json").version;
|
|
255
|
-
if (bindingPackageVersion !== "1.
|
|
255
|
+
if (bindingPackageVersion !== "1.74.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.74.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
256
256
|
return binding;
|
|
257
257
|
} catch (e) {
|
|
258
258
|
loadErrors.push(e);
|
|
@@ -266,7 +266,7 @@ function requireNative() {
|
|
|
266
266
|
}
|
|
267
267
|
try {
|
|
268
268
|
let binding = require("@oxlint/binding-linux-loong64-musl"), bindingPackageVersion = require("@oxlint/binding-linux-loong64-musl/package.json").version;
|
|
269
|
-
if (bindingPackageVersion !== "1.
|
|
269
|
+
if (bindingPackageVersion !== "1.74.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.74.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
270
270
|
return binding;
|
|
271
271
|
} catch (e) {
|
|
272
272
|
loadErrors.push(e);
|
|
@@ -279,7 +279,7 @@ function requireNative() {
|
|
|
279
279
|
}
|
|
280
280
|
try {
|
|
281
281
|
let binding = require("@oxlint/binding-linux-loong64-gnu"), bindingPackageVersion = require("@oxlint/binding-linux-loong64-gnu/package.json").version;
|
|
282
|
-
if (bindingPackageVersion !== "1.
|
|
282
|
+
if (bindingPackageVersion !== "1.74.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.74.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
283
283
|
return binding;
|
|
284
284
|
} catch (e) {
|
|
285
285
|
loadErrors.push(e);
|
|
@@ -293,7 +293,7 @@ function requireNative() {
|
|
|
293
293
|
}
|
|
294
294
|
try {
|
|
295
295
|
let binding = require("@oxlint/binding-linux-riscv64-musl"), bindingPackageVersion = require("@oxlint/binding-linux-riscv64-musl/package.json").version;
|
|
296
|
-
if (bindingPackageVersion !== "1.
|
|
296
|
+
if (bindingPackageVersion !== "1.74.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.74.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
297
297
|
return binding;
|
|
298
298
|
} catch (e) {
|
|
299
299
|
loadErrors.push(e);
|
|
@@ -306,7 +306,7 @@ function requireNative() {
|
|
|
306
306
|
}
|
|
307
307
|
try {
|
|
308
308
|
let binding = require("@oxlint/binding-linux-riscv64-gnu"), bindingPackageVersion = require("@oxlint/binding-linux-riscv64-gnu/package.json").version;
|
|
309
|
-
if (bindingPackageVersion !== "1.
|
|
309
|
+
if (bindingPackageVersion !== "1.74.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.74.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
310
310
|
return binding;
|
|
311
311
|
} catch (e) {
|
|
312
312
|
loadErrors.push(e);
|
|
@@ -320,7 +320,7 @@ function requireNative() {
|
|
|
320
320
|
}
|
|
321
321
|
try {
|
|
322
322
|
let binding = require("@oxlint/binding-linux-ppc64-gnu"), bindingPackageVersion = require("@oxlint/binding-linux-ppc64-gnu/package.json").version;
|
|
323
|
-
if (bindingPackageVersion !== "1.
|
|
323
|
+
if (bindingPackageVersion !== "1.74.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.74.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
324
324
|
return binding;
|
|
325
325
|
} catch (e) {
|
|
326
326
|
loadErrors.push(e);
|
|
@@ -333,7 +333,7 @@ function requireNative() {
|
|
|
333
333
|
}
|
|
334
334
|
try {
|
|
335
335
|
let binding = require("@oxlint/binding-linux-s390x-gnu"), bindingPackageVersion = require("@oxlint/binding-linux-s390x-gnu/package.json").version;
|
|
336
|
-
if (bindingPackageVersion !== "1.
|
|
336
|
+
if (bindingPackageVersion !== "1.74.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.74.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
337
337
|
return binding;
|
|
338
338
|
} catch (e) {
|
|
339
339
|
loadErrors.push(e);
|
|
@@ -347,7 +347,7 @@ function requireNative() {
|
|
|
347
347
|
}
|
|
348
348
|
try {
|
|
349
349
|
let binding = require("@oxlint/binding-openharmony-arm64"), bindingPackageVersion = require("@oxlint/binding-openharmony-arm64/package.json").version;
|
|
350
|
-
if (bindingPackageVersion !== "1.
|
|
350
|
+
if (bindingPackageVersion !== "1.74.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.74.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
351
351
|
return binding;
|
|
352
352
|
} catch (e) {
|
|
353
353
|
loadErrors.push(e);
|
|
@@ -360,7 +360,7 @@ function requireNative() {
|
|
|
360
360
|
}
|
|
361
361
|
try {
|
|
362
362
|
let binding = require("@oxlint/binding-openharmony-x64"), bindingPackageVersion = require("@oxlint/binding-openharmony-x64/package.json").version;
|
|
363
|
-
if (bindingPackageVersion !== "1.
|
|
363
|
+
if (bindingPackageVersion !== "1.74.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.74.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
364
364
|
return binding;
|
|
365
365
|
} catch (e) {
|
|
366
366
|
loadErrors.push(e);
|
|
@@ -373,7 +373,7 @@ function requireNative() {
|
|
|
373
373
|
}
|
|
374
374
|
try {
|
|
375
375
|
let binding = require("@oxlint/binding-openharmony-arm"), bindingPackageVersion = require("@oxlint/binding-openharmony-arm/package.json").version;
|
|
376
|
-
if (bindingPackageVersion !== "1.
|
|
376
|
+
if (bindingPackageVersion !== "1.74.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.74.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
377
377
|
return binding;
|
|
378
378
|
} catch (e) {
|
|
379
379
|
loadErrors.push(e);
|
package/dist/index.d.ts
CHANGED
|
@@ -114,6 +114,7 @@ type AllowKind = "functions" | "arrowFunctions" | "generatorFunctions" | "method
|
|
|
114
114
|
*/
|
|
115
115
|
type NoInnerDeclarationsConfig = "functions" | "both";
|
|
116
116
|
type BlockScopedFunctions = "allow" | "disallow";
|
|
117
|
+
type Namespaces = "allow" | "disallow";
|
|
117
118
|
type NoMagicNumbersNumber = number | string;
|
|
118
119
|
type NoRestrictedImportsConfigEnum = string | RestrictedPath | NoRestrictedImportsConfig;
|
|
119
120
|
type PossiblePaths = string | RestrictedPath;
|
|
@@ -123,6 +124,7 @@ type NoReturnAssignMode = "always" | "except-parens";
|
|
|
123
124
|
* Controls how hoisting is handled when checking for shadowing.
|
|
124
125
|
*/
|
|
125
126
|
type HoistOption = "all" | "functions" | "functions-and-types" | "never" | "types";
|
|
127
|
+
type LoopType = "WhileStatement" | "DoWhileStatement" | "ForStatement" | "ForInStatement" | "ForOfStatement";
|
|
126
128
|
type NoUnusedVarsConfig = VarsOption | NoUnusedVarsOptions;
|
|
127
129
|
type VarsOption = "all" | "local";
|
|
128
130
|
type ArgsOption = "after-used" | "all" | "none";
|
|
@@ -295,6 +297,7 @@ type PathOption = "always" | "never";
|
|
|
295
297
|
type TypesOption = "always" | "never" | "prefer-import";
|
|
296
298
|
type BomOptionType = "always" | "never";
|
|
297
299
|
type NonZero = "greater-than" | "not-equal";
|
|
300
|
+
type ExplicitTimerDelayMode = "always" | "never";
|
|
298
301
|
type ModuleStylesOverride = (false | {
|
|
299
302
|
/**
|
|
300
303
|
* Whether default imports or whole-module `require()` assignments are allowed for this module.
|
|
@@ -480,7 +483,10 @@ interface Oxlintrc$1 {
|
|
|
480
483
|
*/
|
|
481
484
|
globals?: OxlintGlobals;
|
|
482
485
|
/**
|
|
483
|
-
* Globs to ignore during linting.
|
|
486
|
+
* Globs to ignore during linting. Patterns use gitignore-style matching,
|
|
487
|
+
* rooted at the directory containing the configuration file.
|
|
488
|
+
* Files outside that directory cannot be matched; patterns containing `..`
|
|
489
|
+
* are rejected as a configuration error.
|
|
484
490
|
*/
|
|
485
491
|
ignorePatterns?: string[];
|
|
486
492
|
/**
|
|
@@ -921,7 +927,7 @@ interface DummyRuleMap {
|
|
|
921
927
|
"jsdoc/empty-tags"?: RuleNoConfig | [AllowWarnDeny, EmptyTagsConfig];
|
|
922
928
|
"jsdoc/implements-on-classes"?: RuleNoConfig;
|
|
923
929
|
"jsdoc/no-defaults"?: RuleNoConfig | [AllowWarnDeny, NoDefaultsConfig];
|
|
924
|
-
"jsdoc/require-param"?:
|
|
930
|
+
"jsdoc/require-param"?: RuleNoConfig | [AllowWarnDeny, RequireParamConfig];
|
|
925
931
|
"jsdoc/require-param-description"?: RuleNoConfig | [AllowWarnDeny, RequireParamDescriptionConfig];
|
|
926
932
|
"jsdoc/require-param-name"?: RuleNoConfig;
|
|
927
933
|
"jsdoc/require-param-type"?: RuleNoConfig | [AllowWarnDeny, RequireParamTypeConfig];
|
|
@@ -1015,7 +1021,7 @@ interface DummyRuleMap {
|
|
|
1015
1021
|
"no-cond-assign"?: RuleNoConfig | [AllowWarnDeny, NoCondAssignConfig];
|
|
1016
1022
|
"no-console"?: RuleNoConfig | [AllowWarnDeny, NoConsoleConfig];
|
|
1017
1023
|
"no-const-assign"?: RuleNoConfig;
|
|
1018
|
-
"no-constant-binary-expression"?: RuleNoConfig;
|
|
1024
|
+
"no-constant-binary-expression"?: RuleNoConfig | [AllowWarnDeny, NoConstantBinaryExpressionConfig];
|
|
1019
1025
|
"no-constant-condition"?: RuleNoConfig | [AllowWarnDeny, NoConstantCondition];
|
|
1020
1026
|
"no-constructor-return"?: RuleNoConfig;
|
|
1021
1027
|
"no-continue"?: RuleNoConfig;
|
|
@@ -1104,6 +1110,7 @@ interface DummyRuleMap {
|
|
|
1104
1110
|
"no-unmodified-loop-condition"?: RuleNoConfig;
|
|
1105
1111
|
"no-unneeded-ternary"?: RuleNoConfig | [AllowWarnDeny, NoUnneededTernary];
|
|
1106
1112
|
"no-unreachable"?: RuleNoConfig;
|
|
1113
|
+
"no-unreachable-loop"?: RuleNoConfig | [AllowWarnDeny, NoUnreachableLoopConfig];
|
|
1107
1114
|
"no-unsafe-finally"?: RuleNoConfig;
|
|
1108
1115
|
"no-unsafe-negation"?: RuleNoConfig | [AllowWarnDeny, NoUnsafeNegation];
|
|
1109
1116
|
"no-unsafe-optional-chaining"?: RuleNoConfig | [AllowWarnDeny, NoUnsafeOptionalChaining];
|
|
@@ -1391,6 +1398,7 @@ interface DummyRuleMap {
|
|
|
1391
1398
|
"unicorn/error-message"?: RuleNoConfig;
|
|
1392
1399
|
"unicorn/escape-case"?: RuleNoConfig;
|
|
1393
1400
|
"unicorn/explicit-length-check"?: RuleNoConfig | [AllowWarnDeny, ExplicitLengthCheck];
|
|
1401
|
+
"unicorn/explicit-timer-delay"?: RuleNoConfig | [AllowWarnDeny, ExplicitTimerDelayMode];
|
|
1394
1402
|
"unicorn/filename-case"?: DummyRule;
|
|
1395
1403
|
"unicorn/import-style"?: RuleNoConfig | [AllowWarnDeny, ImportStyleConfig];
|
|
1396
1404
|
"unicorn/max-nested-calls"?: RuleNoConfig | [AllowWarnDeny, MaxNestedCalls];
|
|
@@ -1407,6 +1415,7 @@ interface DummyRuleMap {
|
|
|
1407
1415
|
"unicorn/no-array-sort"?: RuleNoConfig | [AllowWarnDeny, NoArraySort];
|
|
1408
1416
|
"unicorn/no-await-expression-member"?: RuleNoConfig;
|
|
1409
1417
|
"unicorn/no-await-in-promise-methods"?: RuleNoConfig;
|
|
1418
|
+
"unicorn/no-confusing-array-with"?: RuleNoConfig;
|
|
1410
1419
|
"unicorn/no-console-spaces"?: RuleNoConfig;
|
|
1411
1420
|
"unicorn/no-document-cookie"?: RuleNoConfig;
|
|
1412
1421
|
"unicorn/no-empty-file"?: RuleNoConfig;
|
|
@@ -2268,6 +2277,7 @@ interface PreferEndingWithAnExpectConfig {
|
|
|
2268
2277
|
additionalTestBlockFunctions?: string[];
|
|
2269
2278
|
/**
|
|
2270
2279
|
* A list of function names that should be treated as assertion functions.
|
|
2280
|
+
* Default: `["expect"]`
|
|
2271
2281
|
*/
|
|
2272
2282
|
assertFunctionNames?: string[];
|
|
2273
2283
|
}
|
|
@@ -2342,6 +2352,56 @@ interface NoDefaultsConfig {
|
|
|
2342
2352
|
*/
|
|
2343
2353
|
noOptionalParamNames?: boolean;
|
|
2344
2354
|
}
|
|
2355
|
+
interface RequireParamConfig {
|
|
2356
|
+
/**
|
|
2357
|
+
* Whether to check constructor methods.
|
|
2358
|
+
*/
|
|
2359
|
+
checkConstructors?: boolean;
|
|
2360
|
+
/**
|
|
2361
|
+
* Whether to check destructured parameters.
|
|
2362
|
+
*/
|
|
2363
|
+
checkDestructured?: boolean;
|
|
2364
|
+
/**
|
|
2365
|
+
* Whether to check destructured parameters when you have code like
|
|
2366
|
+
* `function doSomething({ a, b }) { ... }`. Because there is no named
|
|
2367
|
+
* parameter in this example, when this option is `true` you must
|
|
2368
|
+
* have a `@param` tag that corresponds to `{a, b}`.
|
|
2369
|
+
*/
|
|
2370
|
+
checkDestructuredRoots?: boolean;
|
|
2371
|
+
/**
|
|
2372
|
+
* Whether to check getter methods.
|
|
2373
|
+
*/
|
|
2374
|
+
checkGetters?: boolean;
|
|
2375
|
+
/**
|
|
2376
|
+
* Whether to check rest properties.
|
|
2377
|
+
*/
|
|
2378
|
+
checkRestProperty?: boolean;
|
|
2379
|
+
/**
|
|
2380
|
+
* Whether to check setter methods.
|
|
2381
|
+
*/
|
|
2382
|
+
checkSetters?: boolean;
|
|
2383
|
+
/**
|
|
2384
|
+
* Regex pattern to match types that exempt parameters from checking.
|
|
2385
|
+
*/
|
|
2386
|
+
checkTypesPattern?: string;
|
|
2387
|
+
/**
|
|
2388
|
+
* List of JSDoc tags that exempt functions from `@param` checking.
|
|
2389
|
+
*/
|
|
2390
|
+
exemptedBy?: string[];
|
|
2391
|
+
/**
|
|
2392
|
+
* Set to `true` to ignore reporting when all params are missing. Defaults to `false`.
|
|
2393
|
+
*/
|
|
2394
|
+
ignoreWhenAllParamsMissing?: boolean;
|
|
2395
|
+
/**
|
|
2396
|
+
* Set if you wish TypeScript interfaces to exempt checks for the existence of `@param`'s.
|
|
2397
|
+
* Will check for a type defining the function itself (on a variable declaration) or if there is a single destructured object with a type. Defaults to `false`.
|
|
2398
|
+
*/
|
|
2399
|
+
interfaceExemptsParamsCheck?: boolean;
|
|
2400
|
+
/**
|
|
2401
|
+
* Set to `true` if you wish to expect documentation of properties on objects supplied as default values. Defaults to `false`.
|
|
2402
|
+
*/
|
|
2403
|
+
useDefaultObjectProperties?: boolean;
|
|
2404
|
+
}
|
|
2345
2405
|
interface RequireParamDescriptionConfig {
|
|
2346
2406
|
/**
|
|
2347
2407
|
* The description string to set by default for destructured roots. Defaults to "The root object".
|
|
@@ -2792,6 +2852,9 @@ interface NoConsoleConfig {
|
|
|
2792
2852
|
*/
|
|
2793
2853
|
allow?: string[];
|
|
2794
2854
|
}
|
|
2855
|
+
interface NoConstantBinaryExpressionConfig {
|
|
2856
|
+
checkRelationalComparisons?: boolean;
|
|
2857
|
+
}
|
|
2795
2858
|
interface NoConstantCondition {
|
|
2796
2859
|
/**
|
|
2797
2860
|
* Configuration option to specify whether to check for constant conditions in loops.
|
|
@@ -3018,6 +3081,10 @@ interface NoInnerDeclarationsOptions {
|
|
|
3018
3081
|
* Controls whether function declarations in nested blocks are allowed in strict mode (ES6+ behavior).
|
|
3019
3082
|
*/
|
|
3020
3083
|
blockScopedFunctions?: BlockScopedFunctions;
|
|
3084
|
+
/**
|
|
3085
|
+
* Controls whether declarations directly inside TypeScript namespace or module bodies are allowed.
|
|
3086
|
+
*/
|
|
3087
|
+
namespaces?: Namespaces;
|
|
3021
3088
|
}
|
|
3022
3089
|
interface NoInvalidRegexpConfig {
|
|
3023
3090
|
/**
|
|
@@ -3468,6 +3535,9 @@ interface NoUnneededTernary {
|
|
|
3468
3535
|
*/
|
|
3469
3536
|
defaultAssignment?: boolean;
|
|
3470
3537
|
}
|
|
3538
|
+
interface NoUnreachableLoopConfig {
|
|
3539
|
+
ignore?: LoopType[];
|
|
3540
|
+
}
|
|
3471
3541
|
interface NoUnsafeNegation {
|
|
3472
3542
|
/**
|
|
3473
3543
|
* The `enforceForOrderingRelations` option determines whether negation is allowed
|
|
@@ -4252,20 +4322,20 @@ interface ForbidItemObject {
|
|
|
4252
4322
|
* Component names for which this prop is **allowed** (all others are
|
|
4253
4323
|
* forbidden).
|
|
4254
4324
|
*/
|
|
4255
|
-
allowedFor
|
|
4325
|
+
allowedFor?: string[];
|
|
4256
4326
|
/**
|
|
4257
4327
|
* Glob patterns for component names where the prop is **allowed**.
|
|
4258
4328
|
*/
|
|
4259
|
-
allowedForPatterns
|
|
4329
|
+
allowedForPatterns?: string[];
|
|
4260
4330
|
/**
|
|
4261
4331
|
* Component names for which this prop is **disallowed** (all others are
|
|
4262
4332
|
* allowed).
|
|
4263
4333
|
*/
|
|
4264
|
-
disallowedFor
|
|
4334
|
+
disallowedFor?: string[];
|
|
4265
4335
|
/**
|
|
4266
4336
|
* Glob patterns for component names where the prop is **disallowed**.
|
|
4267
4337
|
*/
|
|
4268
|
-
disallowedForPatterns
|
|
4338
|
+
disallowedForPatterns?: string[];
|
|
4269
4339
|
/**
|
|
4270
4340
|
* Custom message to display.
|
|
4271
4341
|
*/
|
|
@@ -4287,7 +4357,7 @@ interface ForbidDomPropsConfig {
|
|
|
4287
4357
|
* An array of prop names or objects that are forbidden on DOM elements.
|
|
4288
4358
|
*
|
|
4289
4359
|
* Each array element can be a string with the property name, or an object
|
|
4290
|
-
* with `propName`,
|
|
4360
|
+
* with `propName`, optional `disallowedFor` and `disallowedValues` arrays,
|
|
4291
4361
|
* and an optional custom `message`.
|
|
4292
4362
|
*
|
|
4293
4363
|
* Examples:
|
|
@@ -4295,11 +4365,13 @@ interface ForbidDomPropsConfig {
|
|
|
4295
4365
|
* - `["error", { "forbid": ["id", "style"] }]`
|
|
4296
4366
|
* - `["error", { "forbid": [{ "propName": "className", "message": "Use class instead" }] }]`
|
|
4297
4367
|
* - `["error", { "forbid": [{ "propName": "style", "disallowedFor": ["div", "span"] }] }]`
|
|
4368
|
+
* - `["error", { "forbid": [{ "propName": "type", "disallowedValues": ["button"] }] }]`
|
|
4298
4369
|
*/
|
|
4299
4370
|
forbid?: ForbidDomPropsItem[];
|
|
4300
4371
|
}
|
|
4301
4372
|
/**
|
|
4302
|
-
* A prop with optional `disallowedFor` DOM node list
|
|
4373
|
+
* A prop with optional `disallowedFor` DOM node list, optional `disallowedValues`
|
|
4374
|
+
* value list, and custom `message`.
|
|
4303
4375
|
*/
|
|
4304
4376
|
interface PropWithOptions {
|
|
4305
4377
|
/**
|
|
@@ -4308,6 +4380,11 @@ interface PropWithOptions {
|
|
|
4308
4380
|
* DOM elements.
|
|
4309
4381
|
*/
|
|
4310
4382
|
disallowedFor?: string[];
|
|
4383
|
+
/**
|
|
4384
|
+
* A list of string literal values for which this prop is forbidden. If
|
|
4385
|
+
* omitted, the prop is forbidden for all values.
|
|
4386
|
+
*/
|
|
4387
|
+
disallowedValues?: string[];
|
|
4311
4388
|
/**
|
|
4312
4389
|
* A custom message to display when this prop is used.
|
|
4313
4390
|
*/
|
|
@@ -5775,7 +5852,13 @@ interface TripleSlashReferenceConfig {
|
|
|
5775
5852
|
* What to enforce for `/// <reference lib="..." />` references.
|
|
5776
5853
|
*/
|
|
5777
5854
|
lib?: AlwaysNever;
|
|
5855
|
+
/**
|
|
5856
|
+
* What to enforce for `/// <reference path="..." />` references.
|
|
5857
|
+
*/
|
|
5778
5858
|
path?: PathOption;
|
|
5859
|
+
/**
|
|
5860
|
+
* What to enforce for `/// <reference types="..." />` references.
|
|
5861
|
+
*/
|
|
5779
5862
|
types?: TypesOption;
|
|
5780
5863
|
}
|
|
5781
5864
|
interface UnboundMethodConfig {
|
|
@@ -5959,6 +6042,16 @@ interface NoArrayReverse {
|
|
|
5959
6042
|
allowExpressionStatement?: boolean;
|
|
5960
6043
|
}
|
|
5961
6044
|
interface NoArraySort {
|
|
6045
|
+
/**
|
|
6046
|
+
* When set to `true`, allows sorting a fresh array created by a spread, e.g. `[...iterable].sort()`.
|
|
6047
|
+
* This avoids the double allocation of `toSorted()` when sorting an iterable such as a `Set`.
|
|
6048
|
+
*
|
|
6049
|
+
* Example of **correct** code for this rule with `allowAfterSpread` set to `true`:
|
|
6050
|
+
* ```js
|
|
6051
|
+
* const sorted = [...mySet].sort();
|
|
6052
|
+
* ```
|
|
6053
|
+
*/
|
|
6054
|
+
allowAfterSpread?: boolean;
|
|
5962
6055
|
/**
|
|
5963
6056
|
* When set to `true` (default), allows `array.sort()` as an expression statement.
|
|
5964
6057
|
* Set to `false` to forbid `Array#sort()` even if it's an expression statement.
|
|
@@ -6301,6 +6394,9 @@ interface NoReservedPropsConfig {
|
|
|
6301
6394
|
vueVersion?: number;
|
|
6302
6395
|
}
|
|
6303
6396
|
interface Options {
|
|
6397
|
+
/**
|
|
6398
|
+
* Prop names to ignore, as regular expression patterns.
|
|
6399
|
+
*/
|
|
6304
6400
|
ignoreProps?: string[];
|
|
6305
6401
|
}
|
|
6306
6402
|
interface RequireDirectExport {
|