oxlint 1.32.0 → 1.34.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 +67 -18
- package/dist/bindings.js +27 -27
- package/dist/cli.js +3 -3
- package/dist/index.d.ts +419 -125
- package/dist/index.js +183 -68
- package/dist/lint.js +6977 -4097
- package/dist/plugins.js +6 -2
- package/dist/typescript.cjs +452 -0
- package/package.json +24 -24
- package/dist/ts_eslint.cjs +0 -512
|
@@ -4,6 +4,14 @@
|
|
|
4
4
|
"description": "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```",
|
|
5
5
|
"type": "object",
|
|
6
6
|
"properties": {
|
|
7
|
+
"$schema": {
|
|
8
|
+
"description": "Schema URI for editor tooling.",
|
|
9
|
+
"type": [
|
|
10
|
+
"string",
|
|
11
|
+
"null"
|
|
12
|
+
],
|
|
13
|
+
"markdownDescription": "Schema URI for editor tooling."
|
|
14
|
+
},
|
|
7
15
|
"categories": {
|
|
8
16
|
"default": {},
|
|
9
17
|
"allOf": [
|
|
@@ -53,14 +61,18 @@
|
|
|
53
61
|
},
|
|
54
62
|
"jsPlugins": {
|
|
55
63
|
"description": "JS plugins.\n\nNote: JS plugins are experimental and not subject to semver.\nThey are not supported in language server at present.",
|
|
56
|
-
"
|
|
57
|
-
|
|
58
|
-
|
|
64
|
+
"anyOf": [
|
|
65
|
+
{
|
|
66
|
+
"type": "null"
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"type": "array",
|
|
70
|
+
"items": {
|
|
71
|
+
"$ref": "#/definitions/ExternalPluginEntry"
|
|
72
|
+
},
|
|
73
|
+
"uniqueItems": true
|
|
74
|
+
}
|
|
59
75
|
],
|
|
60
|
-
"items": {
|
|
61
|
-
"type": "string"
|
|
62
|
-
},
|
|
63
|
-
"uniqueItems": true,
|
|
64
76
|
"markdownDescription": "JS plugins.\n\nNote: JS plugins are experimental and not subject to semver.\nThey are not supported in language server at present."
|
|
65
77
|
},
|
|
66
78
|
"overrides": {
|
|
@@ -130,6 +142,7 @@
|
|
|
130
142
|
]
|
|
131
143
|
}
|
|
132
144
|
},
|
|
145
|
+
"additionalProperties": false,
|
|
133
146
|
"allowComments": true,
|
|
134
147
|
"allowTrailingCommas": true,
|
|
135
148
|
"definitions": {
|
|
@@ -216,6 +229,37 @@
|
|
|
216
229
|
},
|
|
217
230
|
"markdownDescription": "See [Oxlint Rules](https://oxc.rs/docs/guide/usage/linter/rules.html)"
|
|
218
231
|
},
|
|
232
|
+
"ExternalPluginEntry": {
|
|
233
|
+
"anyOf": [
|
|
234
|
+
{
|
|
235
|
+
"description": "Path or package name of the plugin",
|
|
236
|
+
"type": "string",
|
|
237
|
+
"markdownDescription": "Path or package name of the plugin"
|
|
238
|
+
},
|
|
239
|
+
{
|
|
240
|
+
"description": "Plugin with custom name/alias",
|
|
241
|
+
"type": "object",
|
|
242
|
+
"required": [
|
|
243
|
+
"name",
|
|
244
|
+
"specifier"
|
|
245
|
+
],
|
|
246
|
+
"properties": {
|
|
247
|
+
"name": {
|
|
248
|
+
"description": "Custom name/alias for the plugin.\n\nNote: The following plugin names are reserved because they are implemented natively in Rust within oxlint and cannot be used for JS plugins:\n- react (includes react-hooks)\n- unicorn\n- typescript\n- oxc\n- import (includes import-x)\n- jsdoc\n- jest\n- vitest\n- jsx-a11y\n- nextjs\n- react-perf\n- promise\n- node\n- regex\n- vue\n- eslint\n\nIf you need to use the JavaScript version of any of these plugins, provide a custom alias to avoid conflicts.",
|
|
249
|
+
"type": "string",
|
|
250
|
+
"markdownDescription": "Custom name/alias for the plugin.\n\nNote: The following plugin names are reserved because they are implemented natively in Rust within oxlint and cannot be used for JS plugins:\n- react (includes react-hooks)\n- unicorn\n- typescript\n- oxc\n- import (includes import-x)\n- jsdoc\n- jest\n- vitest\n- jsx-a11y\n- nextjs\n- react-perf\n- promise\n- node\n- regex\n- vue\n- eslint\n\nIf you need to use the JavaScript version of any of these plugins, provide a custom alias to avoid conflicts."
|
|
251
|
+
},
|
|
252
|
+
"specifier": {
|
|
253
|
+
"description": "Path or package name of the plugin",
|
|
254
|
+
"type": "string",
|
|
255
|
+
"markdownDescription": "Path or package name of the plugin"
|
|
256
|
+
}
|
|
257
|
+
},
|
|
258
|
+
"additionalProperties": false,
|
|
259
|
+
"markdownDescription": "Plugin with custom name/alias"
|
|
260
|
+
}
|
|
261
|
+
]
|
|
262
|
+
},
|
|
219
263
|
"GlobSet": {
|
|
220
264
|
"description": "A set of glob patterns.",
|
|
221
265
|
"type": "array",
|
|
@@ -228,7 +272,7 @@
|
|
|
228
272
|
"type": "string",
|
|
229
273
|
"enum": [
|
|
230
274
|
"readonly",
|
|
231
|
-
"
|
|
275
|
+
"writable",
|
|
232
276
|
"off"
|
|
233
277
|
]
|
|
234
278
|
},
|
|
@@ -474,14 +518,18 @@
|
|
|
474
518
|
},
|
|
475
519
|
"jsPlugins": {
|
|
476
520
|
"description": "JS plugins for this override.\n\nNote: JS plugins are experimental and not subject to semver.\nThey are not supported in language server at present.",
|
|
477
|
-
"
|
|
478
|
-
|
|
479
|
-
|
|
521
|
+
"anyOf": [
|
|
522
|
+
{
|
|
523
|
+
"type": "null"
|
|
524
|
+
},
|
|
525
|
+
{
|
|
526
|
+
"type": "array",
|
|
527
|
+
"items": {
|
|
528
|
+
"$ref": "#/definitions/ExternalPluginEntry"
|
|
529
|
+
},
|
|
530
|
+
"uniqueItems": true
|
|
531
|
+
}
|
|
480
532
|
],
|
|
481
|
-
"items": {
|
|
482
|
-
"type": "string"
|
|
483
|
-
},
|
|
484
|
-
"uniqueItems": true,
|
|
485
533
|
"markdownDescription": "JS plugins for this override.\n\nNote: JS plugins are experimental and not subject to semver.\nThey are not supported in language server at present."
|
|
486
534
|
},
|
|
487
535
|
"plugins": {
|
|
@@ -505,7 +553,8 @@
|
|
|
505
553
|
}
|
|
506
554
|
]
|
|
507
555
|
}
|
|
508
|
-
}
|
|
556
|
+
},
|
|
557
|
+
"additionalProperties": false
|
|
509
558
|
},
|
|
510
559
|
"OxlintOverrides": {
|
|
511
560
|
"type": "array",
|
|
@@ -646,7 +695,7 @@
|
|
|
646
695
|
]
|
|
647
696
|
},
|
|
648
697
|
"VitestPluginSettings": {
|
|
649
|
-
"description": "Configure Vitest plugin rules.\n\nSee [eslint-plugin-vitest](https://github.com/
|
|
698
|
+
"description": "Configure Vitest plugin rules.\n\nSee [eslint-plugin-vitest](https://github.com/vitest-dev/eslint-plugin-vitest)'s\nconfiguration for a full reference.",
|
|
650
699
|
"type": "object",
|
|
651
700
|
"properties": {
|
|
652
701
|
"typecheck": {
|
|
@@ -656,7 +705,7 @@
|
|
|
656
705
|
"markdownDescription": "Whether to enable typecheck mode for Vitest rules.\nWhen enabled, some rules will skip certain checks for describe blocks\nto accommodate TypeScript type checking scenarios."
|
|
657
706
|
}
|
|
658
707
|
},
|
|
659
|
-
"markdownDescription": "Configure Vitest plugin rules.\n\nSee [eslint-plugin-vitest](https://github.com/
|
|
708
|
+
"markdownDescription": "Configure Vitest plugin rules.\n\nSee [eslint-plugin-vitest](https://github.com/vitest-dev/eslint-plugin-vitest)'s\nconfiguration for a full reference."
|
|
660
709
|
}
|
|
661
710
|
},
|
|
662
711
|
"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```"
|
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.
|
|
39
|
+
if (bindingPackageVersion !== "1.34.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.34.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.
|
|
52
|
+
if (bindingPackageVersion !== "1.34.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.34.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.
|
|
66
|
+
if (bindingPackageVersion !== "1.34.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.34.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.
|
|
79
|
+
if (bindingPackageVersion !== "1.34.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.34.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.
|
|
93
|
+
if (bindingPackageVersion !== "1.34.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.34.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.
|
|
106
|
+
if (bindingPackageVersion !== "1.34.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.34.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.
|
|
120
|
+
if (bindingPackageVersion !== "1.34.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.34.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.
|
|
133
|
+
if (bindingPackageVersion !== "1.34.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.34.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.
|
|
146
|
+
if (bindingPackageVersion !== "1.34.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.34.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.
|
|
160
|
+
if (bindingPackageVersion !== "1.34.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.34.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.
|
|
173
|
+
if (bindingPackageVersion !== "1.34.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.34.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.
|
|
187
|
+
if (bindingPackageVersion !== "1.34.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.34.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.
|
|
200
|
+
if (bindingPackageVersion !== "1.34.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.34.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.
|
|
214
|
+
if (bindingPackageVersion !== "1.34.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.34.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.
|
|
227
|
+
if (bindingPackageVersion !== "1.34.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.34.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.
|
|
241
|
+
if (bindingPackageVersion !== "1.34.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.34.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.
|
|
254
|
+
if (bindingPackageVersion !== "1.34.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.34.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.
|
|
268
|
+
if (bindingPackageVersion !== "1.34.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.34.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.
|
|
281
|
+
if (bindingPackageVersion !== "1.34.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.34.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.
|
|
295
|
+
if (bindingPackageVersion !== "1.34.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.34.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.
|
|
308
|
+
if (bindingPackageVersion !== "1.34.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.34.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.
|
|
322
|
+
if (bindingPackageVersion !== "1.34.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.34.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.
|
|
335
|
+
if (bindingPackageVersion !== "1.34.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.34.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.
|
|
349
|
+
if (bindingPackageVersion !== "1.34.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.34.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.
|
|
362
|
+
if (bindingPackageVersion !== "1.34.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.34.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.
|
|
375
|
+
if (bindingPackageVersion !== "1.34.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.34.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);
|
|
@@ -398,5 +398,5 @@ if (nativeBinding = requireNative(), !nativeBinding || process.env.NAPI_RS_FORCE
|
|
|
398
398
|
}
|
|
399
399
|
}
|
|
400
400
|
if (!nativeBinding) throw loadErrors.length > 0 ? Error("Cannot find native binding. npm has a bug related to optional dependencies (https://github.com/npm/cli/issues/4828). Please try `npm i` again after removing both package-lock.json and node_modules directory.", { cause: loadErrors.reduce((err, cur) => (cur.cause = err, cur)) }) : Error("Failed to load native binding");
|
|
401
|
-
const { getBufferOffset, lint, parseRawSync, rawTransferSupported } = nativeBinding;
|
|
401
|
+
const { Severity, getBufferOffset, lint, parseRawSync, rawTransferSupported } = nativeBinding;
|
|
402
402
|
export { rawTransferSupported as i, lint as n, parseRawSync as r, getBufferOffset as t };
|
package/dist/cli.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { n as lint } from "./bindings.js";
|
|
2
2
|
let loadPlugin = null, setupConfigs = null, lintFile = null;
|
|
3
|
-
function loadPluginWrapper(path,
|
|
4
|
-
return loadPlugin === null ? import("./plugins.js").then((mod) => ({loadPlugin, lintFile, setupConfigs} = mod, loadPlugin(path,
|
|
3
|
+
function loadPluginWrapper(path, pluginName, pluginNameIsAlias) {
|
|
4
|
+
return loadPlugin === null ? import("./plugins.js").then((mod) => ({loadPlugin, lintFile, setupConfigs} = mod, loadPlugin(path, pluginName, pluginNameIsAlias))) : loadPlugin(path, pluginName, pluginNameIsAlias);
|
|
5
5
|
}
|
|
6
6
|
function setupConfigsWrapper(optionsJSON) {
|
|
7
|
-
setupConfigs(optionsJSON);
|
|
7
|
+
return setupConfigs(optionsJSON);
|
|
8
8
|
}
|
|
9
9
|
function lintFileWrapper(filePath, bufferId, buffer, ruleIds, optionsIds, settingsJSON, globalsJSON) {
|
|
10
10
|
return lintFile(filePath, bufferId, buffer, ruleIds, optionsIds, settingsJSON, globalsJSON);
|