oxlint 1.53.0 → 1.54.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 +2 -2
- package/dist/bindings.js +26 -26
- package/dist/js_config.js +21 -6
- package/dist/lint.js +5 -2
- package/package.json +20 -20
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
3
|
"title": "Oxlintrc",
|
|
4
|
-
"description": "Oxlint Configuration File\n\nThis configuration is aligned with ESLint v8's configuration schema (`eslintrc.json`).\n\nUsage: `oxlint -c oxlintrc.json`\n\nExample\n\n`.oxlintrc.json`\n\n```json\n{\n\"$schema\": \"./node_modules/oxlint/configuration_schema.json\",\n\"plugins\": [\"import\", \"typescript\", \"unicorn\"],\n\"env\": {\n\"browser\": true\n},\n\"globals\": {\n\"foo\": \"readonly\"\n},\n\"settings\": {\n\"react\": {\n\"version\": \"18.2.0\"\n},\n\"custom\": { \"option\": true }\n},\n\"rules\": {\n\"eqeqeq\": \"warn\",\n\"import/no-cycle\": \"error\",\n\"react/self-closing-comp\": [\"error\", { \"html\": false }]\n},\n\"overrides\": [\n{\n\"files\": [\"*.test.ts\", \"*.spec.ts\"],\n\"rules\": {\n\"@typescript-eslint/no-explicit-any\": \"off\"\n}\n}\n]\n}\n```\n\n`oxlint.config.ts`\n\n```ts\nimport { defineConfig } from \"oxlint\";\n\nexport default defineConfig({\nplugins: [\"import\", \"typescript\", \"unicorn\"],\nenv: {\n\"browser\": true\n},\nglobals: {\n\"foo\": \"readonly\"\n},\nsettings: {\nreact: {\nversion: \"18.2.0\"\n},\ncustom: { option: true }\n},\nrules: {\n\"eqeqeq\": \"warn\",\n\"import/no-cycle\": \"error\",\n\"react/self-closing-comp\": [\"error\", { \"html\": false }]\n},\noverrides: [\n{\nfiles: [\"*.test.ts\", \"*.spec.ts\"],\nrules: {\n\"@typescript-eslint/no-explicit-any\": \"off\"\n}\n}\n]\n}
|
|
4
|
+
"description": "Oxlint Configuration File\n\nThis configuration is aligned with ESLint v8's configuration schema (`eslintrc.json`).\n\nUsage: `oxlint -c oxlintrc.json`\n\nExample\n\n`.oxlintrc.json`\n\n```json\n{\n\"$schema\": \"./node_modules/oxlint/configuration_schema.json\",\n\"plugins\": [\"import\", \"typescript\", \"unicorn\"],\n\"env\": {\n\"browser\": true\n},\n\"globals\": {\n\"foo\": \"readonly\"\n},\n\"settings\": {\n\"react\": {\n\"version\": \"18.2.0\"\n},\n\"custom\": { \"option\": true }\n},\n\"rules\": {\n\"eqeqeq\": \"warn\",\n\"import/no-cycle\": \"error\",\n\"react/self-closing-comp\": [\"error\", { \"html\": false }]\n},\n\"overrides\": [\n{\n\"files\": [\"*.test.ts\", \"*.spec.ts\"],\n\"rules\": {\n\"@typescript-eslint/no-explicit-any\": \"off\"\n}\n}\n]\n}\n```\n\n`oxlint.config.ts`\n\n```ts\nimport { defineConfig } from \"oxlint\";\n\nexport default defineConfig({\nplugins: [\"import\", \"typescript\", \"unicorn\"],\nenv: {\n\"browser\": true\n},\nglobals: {\n\"foo\": \"readonly\"\n},\nsettings: {\nreact: {\nversion: \"18.2.0\"\n},\ncustom: { option: true }\n},\nrules: {\n\"eqeqeq\": \"warn\",\n\"import/no-cycle\": \"error\",\n\"react/self-closing-comp\": [\"error\", { \"html\": false }]\n},\noverrides: [\n{\nfiles: [\"*.test.ts\", \"*.spec.ts\"],\nrules: {\n\"@typescript-eslint/no-explicit-any\": \"off\"\n}\n}\n]\n});\n```",
|
|
5
5
|
"type": "object",
|
|
6
6
|
"properties": {
|
|
7
7
|
"$schema": {
|
|
@@ -796,5 +796,5 @@
|
|
|
796
796
|
"markdownDescription": "Configure Vitest plugin rules.\n\nSee [eslint-plugin-vitest](https://github.com/vitest-dev/eslint-plugin-vitest)'s\nconfiguration for a full reference."
|
|
797
797
|
}
|
|
798
798
|
},
|
|
799
|
-
"markdownDescription": "Oxlint Configuration File\n\nThis configuration is aligned with ESLint v8's configuration schema (`eslintrc.json`).\n\nUsage: `oxlint -c oxlintrc.json`\n\nExample\n\n`.oxlintrc.json`\n\n```json\n{\n\"$schema\": \"./node_modules/oxlint/configuration_schema.json\",\n\"plugins\": [\"import\", \"typescript\", \"unicorn\"],\n\"env\": {\n\"browser\": true\n},\n\"globals\": {\n\"foo\": \"readonly\"\n},\n\"settings\": {\n\"react\": {\n\"version\": \"18.2.0\"\n},\n\"custom\": { \"option\": true }\n},\n\"rules\": {\n\"eqeqeq\": \"warn\",\n\"import/no-cycle\": \"error\",\n\"react/self-closing-comp\": [\"error\", { \"html\": false }]\n},\n\"overrides\": [\n{\n\"files\": [\"*.test.ts\", \"*.spec.ts\"],\n\"rules\": {\n\"@typescript-eslint/no-explicit-any\": \"off\"\n}\n}\n]\n}\n```\n\n`oxlint.config.ts`\n\n```ts\nimport { defineConfig } from \"oxlint\";\n\nexport default defineConfig({\nplugins: [\"import\", \"typescript\", \"unicorn\"],\nenv: {\n\"browser\": true\n},\nglobals: {\n\"foo\": \"readonly\"\n},\nsettings: {\nreact: {\nversion: \"18.2.0\"\n},\ncustom: { option: true }\n},\nrules: {\n\"eqeqeq\": \"warn\",\n\"import/no-cycle\": \"error\",\n\"react/self-closing-comp\": [\"error\", { \"html\": false }]\n},\noverrides: [\n{\nfiles: [\"*.test.ts\", \"*.spec.ts\"],\nrules: {\n\"@typescript-eslint/no-explicit-any\": \"off\"\n}\n}\n]\n}
|
|
799
|
+
"markdownDescription": "Oxlint Configuration File\n\nThis configuration is aligned with ESLint v8's configuration schema (`eslintrc.json`).\n\nUsage: `oxlint -c oxlintrc.json`\n\nExample\n\n`.oxlintrc.json`\n\n```json\n{\n\"$schema\": \"./node_modules/oxlint/configuration_schema.json\",\n\"plugins\": [\"import\", \"typescript\", \"unicorn\"],\n\"env\": {\n\"browser\": true\n},\n\"globals\": {\n\"foo\": \"readonly\"\n},\n\"settings\": {\n\"react\": {\n\"version\": \"18.2.0\"\n},\n\"custom\": { \"option\": true }\n},\n\"rules\": {\n\"eqeqeq\": \"warn\",\n\"import/no-cycle\": \"error\",\n\"react/self-closing-comp\": [\"error\", { \"html\": false }]\n},\n\"overrides\": [\n{\n\"files\": [\"*.test.ts\", \"*.spec.ts\"],\n\"rules\": {\n\"@typescript-eslint/no-explicit-any\": \"off\"\n}\n}\n]\n}\n```\n\n`oxlint.config.ts`\n\n```ts\nimport { defineConfig } from \"oxlint\";\n\nexport default defineConfig({\nplugins: [\"import\", \"typescript\", \"unicorn\"],\nenv: {\n\"browser\": true\n},\nglobals: {\n\"foo\": \"readonly\"\n},\nsettings: {\nreact: {\nversion: \"18.2.0\"\n},\ncustom: { option: true }\n},\nrules: {\n\"eqeqeq\": \"warn\",\n\"import/no-cycle\": \"error\",\n\"react/self-closing-comp\": [\"error\", { \"html\": false }]\n},\noverrides: [\n{\nfiles: [\"*.test.ts\", \"*.spec.ts\"],\nrules: {\n\"@typescript-eslint/no-explicit-any\": \"off\"\n}\n}\n]\n});\n```"
|
|
800
800
|
}
|
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.54.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.54.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.54.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.54.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.54.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.54.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.54.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.54.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.54.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.54.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.54.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.54.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.54.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.54.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.54.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.54.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.54.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.54.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.54.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.54.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.54.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.54.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.54.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.54.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.54.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.54.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.54.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.54.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.54.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.54.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.54.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.54.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.54.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.54.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.54.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.54.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.54.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.54.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.54.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.54.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.54.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.54.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.54.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.54.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.54.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.54.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.54.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.54.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.54.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.54.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.54.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.54.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/js_config.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { n as isDefineConfig } from "./config.js";
|
|
2
2
|
import { i as DateNow, o as JSONStringify, r as ArrayIsArray, t as getErrorMessage } from "./utils.js";
|
|
3
|
+
import { basename } from "node:path";
|
|
3
4
|
//#region src-js/js_config.ts
|
|
5
|
+
const isObject = (v) => typeof v == "object" && !!v && !ArrayIsArray(v), VITE_OXLINT_CONFIG_FIELD = "lint";
|
|
4
6
|
function validateConfigExtends(root) {
|
|
5
7
|
let visited = /* @__PURE__ */ new WeakSet(), inStack = /* @__PURE__ */ new WeakSet(), stackObjects = [], stackPaths = [], formatCycleError = (refPath, cycleStart, idx) => `\`extends\` contains a circular reference.
|
|
6
8
|
|
|
@@ -16,7 +18,7 @@ ${refPath} points back to ${cycleStart}\nCycle: ${idx === -1 ? `${cycleStart} ->
|
|
|
16
18
|
if (!ArrayIsArray(maybeExtends)) throw Error("`extends` must be an array of config objects (strings/paths are not supported).");
|
|
17
19
|
for (let i = 0; i < maybeExtends.length; i++) {
|
|
18
20
|
let item = maybeExtends[i];
|
|
19
|
-
if (
|
|
21
|
+
if (!isObject(item)) throw Error(`\`extends[${i}]\` must be a config object (strings/paths are not supported).`);
|
|
20
22
|
let itemPath = `${path}.extends[${i}]`;
|
|
21
23
|
if (inStack.has(item)) {
|
|
22
24
|
let idx = stackObjects.indexOf(item), cycleStart = idx === -1 ? "<unknown>" : stackPaths[idx];
|
|
@@ -43,12 +45,25 @@ async function loadJsConfigs(paths) {
|
|
|
43
45
|
let cacheKey = DateNow(), results = await Promise.allSettled(paths.map(async (path) => {
|
|
44
46
|
let config = (await import(new URL(`file://${path}?cache=${cacheKey}`).href)).default;
|
|
45
47
|
if (config === void 0) throw Error("Configuration file has no default export.");
|
|
46
|
-
if (
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
48
|
+
if (basename(path) === "vite.config.ts") {
|
|
49
|
+
if (!isObject(config)) return {
|
|
50
|
+
path,
|
|
51
|
+
config: null
|
|
52
|
+
};
|
|
53
|
+
let lintConfig = config[VITE_OXLINT_CONFIG_FIELD];
|
|
54
|
+
if (lintConfig === void 0) return {
|
|
55
|
+
path,
|
|
56
|
+
config: null
|
|
57
|
+
};
|
|
58
|
+
if (!isObject(lintConfig)) throw Error(`The \`${VITE_OXLINT_CONFIG_FIELD}\` field in the default export must be an object.`);
|
|
59
|
+
return validateConfigExtends(lintConfig), {
|
|
60
|
+
path,
|
|
61
|
+
config: lintConfig
|
|
62
|
+
};
|
|
50
63
|
}
|
|
51
|
-
|
|
64
|
+
if (!isObject(config)) throw Error("Configuration file must have a default export that is an object.");
|
|
65
|
+
if (!isDefineConfig(config)) throw Error("Configuration file must wrap its default export with defineConfig() from \"oxlint\".");
|
|
66
|
+
return validateConfigExtends(config), {
|
|
52
67
|
path,
|
|
53
68
|
config
|
|
54
69
|
};
|
package/dist/lint.js
CHANGED
|
@@ -13242,7 +13242,7 @@ function resetSettings() {
|
|
|
13242
13242
|
}
|
|
13243
13243
|
//#endregion
|
|
13244
13244
|
//#region package.json
|
|
13245
|
-
var version = "1.
|
|
13245
|
+
var version = "1.54.0";
|
|
13246
13246
|
//#endregion
|
|
13247
13247
|
//#region src-js/plugins/context.ts
|
|
13248
13248
|
let filePath = null, cwd = null;
|
|
@@ -22331,7 +22331,10 @@ function finalizeCompiledVisitor() {
|
|
|
22331
22331
|
}
|
|
22332
22332
|
activeCfgVisitorsCount = 0;
|
|
22333
22333
|
}
|
|
22334
|
-
for (let i = visitPropsCacheNextIndex - 1; i >= 0; i--)
|
|
22334
|
+
for (let i = visitPropsCacheNextIndex - 1; i >= 0; i--) {
|
|
22335
|
+
let visitProp = visitPropsCache[i];
|
|
22336
|
+
visitProp.fn = null, visitProp.selectorStr = null;
|
|
22337
|
+
}
|
|
22335
22338
|
return visitPropsCacheNextIndex = 0, activeLeafVisitorsCount = 0, hasActiveVisitors = !1, visitState;
|
|
22336
22339
|
}
|
|
22337
22340
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "oxlint",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.54.0",
|
|
4
4
|
"description": "Linter for the JavaScript Oxidation Compiler",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eslint",
|
|
@@ -82,24 +82,24 @@
|
|
|
82
82
|
},
|
|
83
83
|
"preferUnplugged": true,
|
|
84
84
|
"optionalDependencies": {
|
|
85
|
-
"@oxlint/binding-darwin-arm64": "1.
|
|
86
|
-
"@oxlint/binding-android-arm64": "1.
|
|
87
|
-
"@oxlint/binding-win32-arm64-msvc": "1.
|
|
88
|
-
"@oxlint/binding-linux-arm64-gnu": "1.
|
|
89
|
-
"@oxlint/binding-linux-arm64-musl": "1.
|
|
90
|
-
"@oxlint/binding-openharmony-arm64": "1.
|
|
91
|
-
"@oxlint/binding-android-arm-eabi": "1.
|
|
92
|
-
"@oxlint/binding-linux-arm-gnueabihf": "1.
|
|
93
|
-
"@oxlint/binding-linux-arm-musleabihf": "1.
|
|
94
|
-
"@oxlint/binding-win32-ia32-msvc": "1.
|
|
95
|
-
"@oxlint/binding-linux-ppc64-gnu": "1.
|
|
96
|
-
"@oxlint/binding-linux-riscv64-gnu": "1.
|
|
97
|
-
"@oxlint/binding-linux-riscv64-musl": "1.
|
|
98
|
-
"@oxlint/binding-linux-s390x-gnu": "1.
|
|
99
|
-
"@oxlint/binding-darwin-x64": "1.
|
|
100
|
-
"@oxlint/binding-win32-x64-msvc": "1.
|
|
101
|
-
"@oxlint/binding-freebsd-x64": "1.
|
|
102
|
-
"@oxlint/binding-linux-x64-gnu": "1.
|
|
103
|
-
"@oxlint/binding-linux-x64-musl": "1.
|
|
85
|
+
"@oxlint/binding-darwin-arm64": "1.54.0",
|
|
86
|
+
"@oxlint/binding-android-arm64": "1.54.0",
|
|
87
|
+
"@oxlint/binding-win32-arm64-msvc": "1.54.0",
|
|
88
|
+
"@oxlint/binding-linux-arm64-gnu": "1.54.0",
|
|
89
|
+
"@oxlint/binding-linux-arm64-musl": "1.54.0",
|
|
90
|
+
"@oxlint/binding-openharmony-arm64": "1.54.0",
|
|
91
|
+
"@oxlint/binding-android-arm-eabi": "1.54.0",
|
|
92
|
+
"@oxlint/binding-linux-arm-gnueabihf": "1.54.0",
|
|
93
|
+
"@oxlint/binding-linux-arm-musleabihf": "1.54.0",
|
|
94
|
+
"@oxlint/binding-win32-ia32-msvc": "1.54.0",
|
|
95
|
+
"@oxlint/binding-linux-ppc64-gnu": "1.54.0",
|
|
96
|
+
"@oxlint/binding-linux-riscv64-gnu": "1.54.0",
|
|
97
|
+
"@oxlint/binding-linux-riscv64-musl": "1.54.0",
|
|
98
|
+
"@oxlint/binding-linux-s390x-gnu": "1.54.0",
|
|
99
|
+
"@oxlint/binding-darwin-x64": "1.54.0",
|
|
100
|
+
"@oxlint/binding-win32-x64-msvc": "1.54.0",
|
|
101
|
+
"@oxlint/binding-freebsd-x64": "1.54.0",
|
|
102
|
+
"@oxlint/binding-linux-x64-gnu": "1.54.0",
|
|
103
|
+
"@oxlint/binding-linux-x64-musl": "1.54.0"
|
|
104
104
|
}
|
|
105
105
|
}
|