oxlint 1.57.0 → 1.59.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.
@@ -57,7 +57,7 @@
57
57
  "markdownDescription": "Globs to ignore during linting. These are resolved from the configuration file path."
58
58
  },
59
59
  "jsPlugins": {
60
- "description": "JS plugins, allows usage of ESLint plugins with Oxlint.\n\nRead more about JS plugins in\n[the docs](https://oxc.rs/docs/guide/usage/linter/js-plugins.html).\n\nNote: JS plugins are in alpha and not subject to semver.\n\nExamples:\n\nBasic usage with a local plugin path.\n\n```json\n{\n\"jsPlugins\": [\"./custom-plugin.js\"],\n\"rules\": {\n\"custom/rule-name\": \"warn\"\n}\n}\n```\n\nUsing a built-in Rust plugin alongside a JS plugin with the same name\nby giving the JS plugin an alias.\n\n```json\n{\n\"plugins\": [\"import\"],\n\"jsPlugins\": [\n{ \"name\": \"import-js\", \"specifier\": \"eslint-plugin-import\" }\n],\n\"rules\": {\n\"import/no-cycle\": \"error\",\n\"import-js/no-unresolved\": \"warn\"\n}\n}\n```",
60
+ "description": "JS plugins, allows usage of ESLint plugins with Oxlint.\n\nRead more about JS plugins in\n[the docs](https://oxc.rs/docs/guide/usage/linter/js-plugins.html).\n\nNote: JS plugins are in alpha and not subject to semver.\n\nExamples:\n\nBasic usage with a local plugin path.\n\n```json\n{\n\"jsPlugins\": [\"./custom-plugin.js\"],\n\"rules\": {\n\"custom/rule-name\": \"warn\"\n}\n}\n```\n\nBasic usage with a TypeScript plugin and a local plugin path.\n\nTypeScript plugin files are supported in the following environments:\n- Deno and Bun: TypeScript files are supported natively.\n- Node.js >=22.18.0 and Node.js ^20.19.0: TypeScript files are supported natively with built-in\ntype-stripping enabled by default.\n\nFor older Node.js versions, TypeScript plugins are not supported. Please use JavaScript plugins or upgrade your Node version.\n\n```json\n{\n\"jsPlugins\": [\"./custom-plugin.ts\"],\n\"rules\": {\n\"custom/rule-name\": \"warn\"\n}\n}\n```\n\nUsing a built-in Rust plugin alongside a JS plugin with the same name\nby giving the JS plugin an alias.\n\n```json\n{\n\"plugins\": [\"import\"],\n\"jsPlugins\": [\n{ \"name\": \"import-js\", \"specifier\": \"eslint-plugin-import\" }\n],\n\"rules\": {\n\"import/no-cycle\": \"error\",\n\"import-js/no-unresolved\": \"warn\"\n}\n}\n```",
61
61
  "anyOf": [
62
62
  {
63
63
  "type": "null"
@@ -70,7 +70,7 @@
70
70
  "uniqueItems": true
71
71
  }
72
72
  ],
73
- "markdownDescription": "JS plugins, allows usage of ESLint plugins with Oxlint.\n\nRead more about JS plugins in\n[the docs](https://oxc.rs/docs/guide/usage/linter/js-plugins.html).\n\nNote: JS plugins are in alpha and not subject to semver.\n\nExamples:\n\nBasic usage with a local plugin path.\n\n```json\n{\n\"jsPlugins\": [\"./custom-plugin.js\"],\n\"rules\": {\n\"custom/rule-name\": \"warn\"\n}\n}\n```\n\nUsing a built-in Rust plugin alongside a JS plugin with the same name\nby giving the JS plugin an alias.\n\n```json\n{\n\"plugins\": [\"import\"],\n\"jsPlugins\": [\n{ \"name\": \"import-js\", \"specifier\": \"eslint-plugin-import\" }\n],\n\"rules\": {\n\"import/no-cycle\": \"error\",\n\"import-js/no-unresolved\": \"warn\"\n}\n}\n```"
73
+ "markdownDescription": "JS plugins, allows usage of ESLint plugins with Oxlint.\n\nRead more about JS plugins in\n[the docs](https://oxc.rs/docs/guide/usage/linter/js-plugins.html).\n\nNote: JS plugins are in alpha and not subject to semver.\n\nExamples:\n\nBasic usage with a local plugin path.\n\n```json\n{\n\"jsPlugins\": [\"./custom-plugin.js\"],\n\"rules\": {\n\"custom/rule-name\": \"warn\"\n}\n}\n```\n\nBasic usage with a TypeScript plugin and a local plugin path.\n\nTypeScript plugin files are supported in the following environments:\n- Deno and Bun: TypeScript files are supported natively.\n- Node.js >=22.18.0 and Node.js ^20.19.0: TypeScript files are supported natively with built-in\ntype-stripping enabled by default.\n\nFor older Node.js versions, TypeScript plugins are not supported. Please use JavaScript plugins or upgrade your Node version.\n\n```json\n{\n\"jsPlugins\": [\"./custom-plugin.ts\"],\n\"rules\": {\n\"custom/rule-name\": \"warn\"\n}\n}\n```\n\nUsing a built-in Rust plugin alongside a JS plugin with the same name\nby giving the JS plugin an alias.\n\n```json\n{\n\"plugins\": [\"import\"],\n\"jsPlugins\": [\n{ \"name\": \"import-js\", \"specifier\": \"eslint-plugin-import\" }\n],\n\"rules\": {\n\"import/no-cycle\": \"error\",\n\"import-js/no-unresolved\": \"warn\"\n}\n}\n```"
74
74
  },
75
75
  "options": {
76
76
  "description": "Oxlint config options.",
@@ -224,7 +224,13 @@
224
224
  },
225
225
  {
226
226
  "type": "array",
227
- "items": true
227
+ "items": [
228
+ {
229
+ "$ref": "#/definitions/AllowWarnDeny"
230
+ }
231
+ ],
232
+ "additionalItems": true,
233
+ "minItems": 1
228
234
  }
229
235
  ]
230
236
  },
@@ -761,4 +767,4 @@
761
767
  }
762
768
  },
763
769
  "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```"
764
- }
770
+ }
package/dist/bindings.js CHANGED
@@ -38,7 +38,7 @@ function requireNative() {
38
38
  }
39
39
  try {
40
40
  let binding = require("@oxlint/binding-android-arm64"), bindingPackageVersion = require("@oxlint/binding-android-arm64/package.json").version;
41
- if (bindingPackageVersion !== "1.56.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.56.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
41
+ if (bindingPackageVersion !== "1.59.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.59.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
42
42
  return binding;
43
43
  } catch (e) {
44
44
  loadErrors.push(e);
@@ -51,7 +51,7 @@ function requireNative() {
51
51
  }
52
52
  try {
53
53
  let binding = require("@oxlint/binding-android-arm-eabi"), bindingPackageVersion = require("@oxlint/binding-android-arm-eabi/package.json").version;
54
- if (bindingPackageVersion !== "1.56.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.56.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
54
+ if (bindingPackageVersion !== "1.59.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.59.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
55
55
  return binding;
56
56
  } catch (e) {
57
57
  loadErrors.push(e);
@@ -65,7 +65,7 @@ function requireNative() {
65
65
  }
66
66
  try {
67
67
  let binding = require("@oxlint/binding-win32-x64-gnu"), bindingPackageVersion = require("@oxlint/binding-win32-x64-gnu/package.json").version;
68
- if (bindingPackageVersion !== "1.56.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.56.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
68
+ if (bindingPackageVersion !== "1.59.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.59.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
69
69
  return binding;
70
70
  } catch (e) {
71
71
  loadErrors.push(e);
@@ -78,7 +78,7 @@ function requireNative() {
78
78
  }
79
79
  try {
80
80
  let binding = require("@oxlint/binding-win32-x64-msvc"), bindingPackageVersion = require("@oxlint/binding-win32-x64-msvc/package.json").version;
81
- if (bindingPackageVersion !== "1.56.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.56.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
81
+ if (bindingPackageVersion !== "1.59.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.59.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
82
82
  return binding;
83
83
  } catch (e) {
84
84
  loadErrors.push(e);
@@ -92,7 +92,7 @@ function requireNative() {
92
92
  }
93
93
  try {
94
94
  let binding = require("@oxlint/binding-win32-ia32-msvc"), bindingPackageVersion = require("@oxlint/binding-win32-ia32-msvc/package.json").version;
95
- if (bindingPackageVersion !== "1.56.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.56.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
95
+ if (bindingPackageVersion !== "1.59.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.59.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
96
96
  return binding;
97
97
  } catch (e) {
98
98
  loadErrors.push(e);
@@ -105,7 +105,7 @@ function requireNative() {
105
105
  }
106
106
  try {
107
107
  let binding = require("@oxlint/binding-win32-arm64-msvc"), bindingPackageVersion = require("@oxlint/binding-win32-arm64-msvc/package.json").version;
108
- if (bindingPackageVersion !== "1.56.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.56.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
108
+ if (bindingPackageVersion !== "1.59.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.59.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
109
109
  return binding;
110
110
  } catch (e) {
111
111
  loadErrors.push(e);
@@ -119,7 +119,7 @@ function requireNative() {
119
119
  }
120
120
  try {
121
121
  let binding = require("@oxlint/binding-darwin-universal"), bindingPackageVersion = require("@oxlint/binding-darwin-universal/package.json").version;
122
- if (bindingPackageVersion !== "1.56.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.56.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
122
+ if (bindingPackageVersion !== "1.59.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.59.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
123
123
  return binding;
124
124
  } catch (e) {
125
125
  loadErrors.push(e);
@@ -132,7 +132,7 @@ function requireNative() {
132
132
  }
133
133
  try {
134
134
  let binding = require("@oxlint/binding-darwin-x64"), bindingPackageVersion = require("@oxlint/binding-darwin-x64/package.json").version;
135
- if (bindingPackageVersion !== "1.56.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.56.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
135
+ if (bindingPackageVersion !== "1.59.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.59.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
136
136
  return binding;
137
137
  } catch (e) {
138
138
  loadErrors.push(e);
@@ -145,7 +145,7 @@ function requireNative() {
145
145
  }
146
146
  try {
147
147
  let binding = require("@oxlint/binding-darwin-arm64"), bindingPackageVersion = require("@oxlint/binding-darwin-arm64/package.json").version;
148
- if (bindingPackageVersion !== "1.56.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.56.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
148
+ if (bindingPackageVersion !== "1.59.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.59.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
149
149
  return binding;
150
150
  } catch (e) {
151
151
  loadErrors.push(e);
@@ -159,7 +159,7 @@ function requireNative() {
159
159
  }
160
160
  try {
161
161
  let binding = require("@oxlint/binding-freebsd-x64"), bindingPackageVersion = require("@oxlint/binding-freebsd-x64/package.json").version;
162
- if (bindingPackageVersion !== "1.56.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.56.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
162
+ if (bindingPackageVersion !== "1.59.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.59.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
163
163
  return binding;
164
164
  } catch (e) {
165
165
  loadErrors.push(e);
@@ -172,7 +172,7 @@ function requireNative() {
172
172
  }
173
173
  try {
174
174
  let binding = require("@oxlint/binding-freebsd-arm64"), bindingPackageVersion = require("@oxlint/binding-freebsd-arm64/package.json").version;
175
- if (bindingPackageVersion !== "1.56.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.56.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
175
+ if (bindingPackageVersion !== "1.59.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.59.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
176
176
  return binding;
177
177
  } catch (e) {
178
178
  loadErrors.push(e);
@@ -186,7 +186,7 @@ function requireNative() {
186
186
  }
187
187
  try {
188
188
  let binding = require("@oxlint/binding-linux-x64-musl"), bindingPackageVersion = require("@oxlint/binding-linux-x64-musl/package.json").version;
189
- if (bindingPackageVersion !== "1.56.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.56.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
189
+ if (bindingPackageVersion !== "1.59.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.59.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
190
190
  return binding;
191
191
  } catch (e) {
192
192
  loadErrors.push(e);
@@ -199,7 +199,7 @@ function requireNative() {
199
199
  }
200
200
  try {
201
201
  let binding = require("@oxlint/binding-linux-x64-gnu"), bindingPackageVersion = require("@oxlint/binding-linux-x64-gnu/package.json").version;
202
- if (bindingPackageVersion !== "1.56.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.56.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
202
+ if (bindingPackageVersion !== "1.59.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.59.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
203
203
  return binding;
204
204
  } catch (e) {
205
205
  loadErrors.push(e);
@@ -213,7 +213,7 @@ function requireNative() {
213
213
  }
214
214
  try {
215
215
  let binding = require("@oxlint/binding-linux-arm64-musl"), bindingPackageVersion = require("@oxlint/binding-linux-arm64-musl/package.json").version;
216
- if (bindingPackageVersion !== "1.56.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.56.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
216
+ if (bindingPackageVersion !== "1.59.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.59.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
217
217
  return binding;
218
218
  } catch (e) {
219
219
  loadErrors.push(e);
@@ -226,7 +226,7 @@ function requireNative() {
226
226
  }
227
227
  try {
228
228
  let binding = require("@oxlint/binding-linux-arm64-gnu"), bindingPackageVersion = require("@oxlint/binding-linux-arm64-gnu/package.json").version;
229
- if (bindingPackageVersion !== "1.56.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.56.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
229
+ if (bindingPackageVersion !== "1.59.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.59.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
230
230
  return binding;
231
231
  } catch (e) {
232
232
  loadErrors.push(e);
@@ -240,7 +240,7 @@ function requireNative() {
240
240
  }
241
241
  try {
242
242
  let binding = require("@oxlint/binding-linux-arm-musleabihf"), bindingPackageVersion = require("@oxlint/binding-linux-arm-musleabihf/package.json").version;
243
- if (bindingPackageVersion !== "1.56.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.56.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
243
+ if (bindingPackageVersion !== "1.59.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.59.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
244
244
  return binding;
245
245
  } catch (e) {
246
246
  loadErrors.push(e);
@@ -253,7 +253,7 @@ function requireNative() {
253
253
  }
254
254
  try {
255
255
  let binding = require("@oxlint/binding-linux-arm-gnueabihf"), bindingPackageVersion = require("@oxlint/binding-linux-arm-gnueabihf/package.json").version;
256
- if (bindingPackageVersion !== "1.56.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.56.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
256
+ if (bindingPackageVersion !== "1.59.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.59.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
257
257
  return binding;
258
258
  } catch (e) {
259
259
  loadErrors.push(e);
@@ -267,7 +267,7 @@ function requireNative() {
267
267
  }
268
268
  try {
269
269
  let binding = require("@oxlint/binding-linux-loong64-musl"), bindingPackageVersion = require("@oxlint/binding-linux-loong64-musl/package.json").version;
270
- if (bindingPackageVersion !== "1.56.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.56.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
270
+ if (bindingPackageVersion !== "1.59.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.59.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
271
271
  return binding;
272
272
  } catch (e) {
273
273
  loadErrors.push(e);
@@ -280,7 +280,7 @@ function requireNative() {
280
280
  }
281
281
  try {
282
282
  let binding = require("@oxlint/binding-linux-loong64-gnu"), bindingPackageVersion = require("@oxlint/binding-linux-loong64-gnu/package.json").version;
283
- if (bindingPackageVersion !== "1.56.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.56.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
283
+ if (bindingPackageVersion !== "1.59.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.59.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
284
284
  return binding;
285
285
  } catch (e) {
286
286
  loadErrors.push(e);
@@ -294,7 +294,7 @@ function requireNative() {
294
294
  }
295
295
  try {
296
296
  let binding = require("@oxlint/binding-linux-riscv64-musl"), bindingPackageVersion = require("@oxlint/binding-linux-riscv64-musl/package.json").version;
297
- if (bindingPackageVersion !== "1.56.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.56.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
297
+ if (bindingPackageVersion !== "1.59.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.59.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
298
298
  return binding;
299
299
  } catch (e) {
300
300
  loadErrors.push(e);
@@ -307,7 +307,7 @@ function requireNative() {
307
307
  }
308
308
  try {
309
309
  let binding = require("@oxlint/binding-linux-riscv64-gnu"), bindingPackageVersion = require("@oxlint/binding-linux-riscv64-gnu/package.json").version;
310
- if (bindingPackageVersion !== "1.56.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.56.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
310
+ if (bindingPackageVersion !== "1.59.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.59.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
311
311
  return binding;
312
312
  } catch (e) {
313
313
  loadErrors.push(e);
@@ -321,7 +321,7 @@ function requireNative() {
321
321
  }
322
322
  try {
323
323
  let binding = require("@oxlint/binding-linux-ppc64-gnu"), bindingPackageVersion = require("@oxlint/binding-linux-ppc64-gnu/package.json").version;
324
- if (bindingPackageVersion !== "1.56.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.56.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
324
+ if (bindingPackageVersion !== "1.59.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.59.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
325
325
  return binding;
326
326
  } catch (e) {
327
327
  loadErrors.push(e);
@@ -334,7 +334,7 @@ function requireNative() {
334
334
  }
335
335
  try {
336
336
  let binding = require("@oxlint/binding-linux-s390x-gnu"), bindingPackageVersion = require("@oxlint/binding-linux-s390x-gnu/package.json").version;
337
- if (bindingPackageVersion !== "1.56.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.56.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
337
+ if (bindingPackageVersion !== "1.59.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.59.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
338
338
  return binding;
339
339
  } catch (e) {
340
340
  loadErrors.push(e);
@@ -348,7 +348,7 @@ function requireNative() {
348
348
  }
349
349
  try {
350
350
  let binding = require("@oxlint/binding-openharmony-arm64"), bindingPackageVersion = require("@oxlint/binding-openharmony-arm64/package.json").version;
351
- if (bindingPackageVersion !== "1.56.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.56.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
351
+ if (bindingPackageVersion !== "1.59.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.59.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
352
352
  return binding;
353
353
  } catch (e) {
354
354
  loadErrors.push(e);
@@ -361,7 +361,7 @@ function requireNative() {
361
361
  }
362
362
  try {
363
363
  let binding = require("@oxlint/binding-openharmony-x64"), bindingPackageVersion = require("@oxlint/binding-openharmony-x64/package.json").version;
364
- if (bindingPackageVersion !== "1.56.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.56.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
364
+ if (bindingPackageVersion !== "1.59.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.59.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
365
365
  return binding;
366
366
  } catch (e) {
367
367
  loadErrors.push(e);
@@ -374,7 +374,7 @@ function requireNative() {
374
374
  }
375
375
  try {
376
376
  let binding = require("@oxlint/binding-openharmony-arm"), bindingPackageVersion = require("@oxlint/binding-openharmony-arm/package.json").version;
377
- if (bindingPackageVersion !== "1.56.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.56.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
377
+ if (bindingPackageVersion !== "1.59.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.59.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
378
378
  return binding;
379
379
  } catch (e) {
380
380
  loadErrors.push(e);
package/dist/cli.js CHANGED
@@ -1,4 +1,3 @@
1
- import "./globals.js";
2
1
  import { r as lint } from "./bindings.js";
3
2
  //#region src-js/cli.ts
4
3
  let loadPlugin = null, setupRuleConfigs = null, lintFile = null, createWorkspace = null, destroyWorkspace = null, loadJsConfigs = null;
package/dist/index.d.ts CHANGED
@@ -36,7 +36,7 @@ type ExternalPluginEntry = string | {
36
36
  type GlobSet = string[];
37
37
  type LintPluginOptionsSchema = "eslint" | "react" | "unicorn" | "typescript" | "oxc" | "import" | "jsdoc" | "jest" | "vitest" | "jsx-a11y" | "nextjs" | "react-perf" | "promise" | "node" | "vue";
38
38
  type LintPlugins = LintPluginOptionsSchema[];
39
- type DummyRule = AllowWarnDeny | unknown[];
39
+ type DummyRule = AllowWarnDeny | [AllowWarnDeny, ...unknown[]];
40
40
  type OxlintOverrides = OxlintOverride[];
41
41
  type TagNamePreference = string | {
42
42
  message: string;
package/dist/js_config.js CHANGED
@@ -1,6 +1,34 @@
1
1
  import { a as JSONStringify, n as ArrayIsArray, r as DateNow } from "./globals.js";
2
2
  import { t as getErrorMessage } from "./utils.js";
3
- import { basename } from "node:path";
3
+ import { basename, extname } from "node:path";
4
+ import { fileURLToPath } from "node:url";
5
+ //#region src-js/utils/node_version.ts
6
+ const TS_MODULE_EXTENSIONS = new Set([
7
+ ".ts",
8
+ ".mts",
9
+ ".cts"
10
+ ]);
11
+ function normalizeModuleSpecifierPath(specifier) {
12
+ if (!specifier.startsWith("file:")) return specifier;
13
+ try {
14
+ return fileURLToPath(specifier);
15
+ } catch {
16
+ return specifier;
17
+ }
18
+ }
19
+ function isTypeScriptModuleSpecifier(specifier) {
20
+ let ext = extname(normalizeModuleSpecifierPath(specifier)).toLowerCase();
21
+ return TS_MODULE_EXTENSIONS.has(ext);
22
+ }
23
+ function isUnknownFileExtensionError(err) {
24
+ if (err?.code === "ERR_UNKNOWN_FILE_EXTENSION") return !0;
25
+ let message = err?.message;
26
+ return typeof message == "string" && /unknown(?: or unsupported)? file extension/i.test(message);
27
+ }
28
+ function getUnsupportedTypeScriptModuleLoadHintForError(err, specifier, nodeVersion = process.version) {
29
+ return !isTypeScriptModuleSpecifier(specifier) || !isUnknownFileExtensionError(err) ? null : `${getErrorMessage(err)}\n\nTypeScript config files require Node.js ^20.19.0 || >=22.18.0.\nDetected Node.js ${nodeVersion}.\nPlease upgrade Node.js or use a JSON config file instead.`;
30
+ }
31
+ //#endregion
4
32
  //#region src-js/js_config.ts
5
33
  const isObject = (v) => typeof v == "object" && !!v && !ArrayIsArray(v), VITE_OXLINT_CONFIG_FIELD = "lint";
6
34
  function validateConfigExtends(root) {
@@ -69,10 +97,14 @@ async function loadJsConfigs(paths) {
69
97
  })), successes = [], errors = [];
70
98
  for (let i = 0; i < results.length; i++) {
71
99
  let result = results[i];
72
- result.status === "fulfilled" ? successes.push(result.value) : errors.push({
73
- path: paths[i],
74
- error: getErrorMessage(result.reason)
75
- });
100
+ if (result.status === "fulfilled") successes.push(result.value);
101
+ else {
102
+ let path = paths[i], unsupportedNodeHint = getUnsupportedTypeScriptModuleLoadHintForError(result.reason, path);
103
+ errors.push({
104
+ path,
105
+ error: unsupportedNodeHint ?? getErrorMessage(result.reason)
106
+ });
107
+ }
76
108
  }
77
109
  return errors.length > 0 ? JSONStringify({ Failures: errors }) : JSONStringify({ Success: successes });
78
110
  } catch (err) {