oxlint 1.75.0 → 1.77.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.
@@ -3020,7 +3020,7 @@ interface Directive {
3020
3020
  type: DirectiveType;
3021
3021
  node: CommentType;
3022
3022
  value: string;
3023
- justification?: string;
3023
+ justification: string;
3024
3024
  }
3025
3025
  declare function getDisableDirectives(): {
3026
3026
  problems: Problem[];
@@ -1,4 +1,4 @@
1
- import { _ as BLOCK_SIZE, b as __commonJSMin, c as allOptions, d as diagnostics, f as replacePlaceholders, g as BLOCK_ALIGN, h as ACTIVE_SIZE, i as resetStateAfterError, l as setOptions, m as getNodeByRangeIndex, o as registerPlugin, p as getLineColumnFromOffset, r as lintFileImpl, s as registeredRules, t as buffers, u as PLACEHOLDER_REGEX, v as BUFFER_SIZE, x as __toESM } from "./lint.js";
1
+ import { S as __toESM, _ as BLOCK_ALIGN, c as registeredRules, d as PLACEHOLDER_REGEX, f as diagnostics, g as ACTIVE_SIZE, h as getNodeByRangeIndex, i as resetStateAfterError, l as allOptions, m as getLineColumnFromOffset, o as registerPlugin, p as replacePlaceholders, r as lintFileImpl, s as registeredPluginNames, t as buffers, u as setOptions, v as BLOCK_SIZE, x as __commonJSMin, y as BUFFER_SIZE } from "./lint.js";
2
2
  import { a as rawTransferSupported$1, i as parseRawSync, n as getBufferOffset, t as applyFixes } from "./bindings.js";
3
3
  import assert, { AssertionError } from "node:assert";
4
4
  import { dirname, isAbsolute, join } from "node:path";
@@ -35,20 +35,20 @@ var import_json_stable_stringify_without_jsonify = /* @__PURE__ */ __toESM((/* @
35
35
  out.push(indent + space + item);
36
36
  }
37
37
  return "[" + out.join(",") + indent + "]";
38
- } else {
39
- if (seen.indexOf(node) !== -1) {
40
- if (cycles) return JSON.stringify("__cycle__");
41
- throw TypeError("Converting circular structure to JSON");
42
- } else seen.push(node);
43
- for (var keys = objectKeys(node).sort(cmp && cmp(node)), out = [], i = 0; i < keys.length; i++) {
44
- var key = keys[i], value = stringify(node, key, node[key], level + 1);
45
- if (value) {
46
- var keyValue = JSON.stringify(key) + colonSeparator + value;
47
- out.push(indent + space + keyValue);
48
- }
38
+ }
39
+ if (seen.indexOf(node) !== -1) {
40
+ if (cycles) return JSON.stringify("__cycle__");
41
+ throw TypeError("Converting circular structure to JSON");
42
+ }
43
+ seen.push(node);
44
+ for (var keys = objectKeys(node).sort(cmp && cmp(node)), out = [], i = 0; i < keys.length; i++) {
45
+ var key = keys[i], value = stringify(node, key, node[key], level + 1);
46
+ if (value) {
47
+ var keyValue = JSON.stringify(key) + colonSeparator + value;
48
+ out.push(indent + space + keyValue);
49
49
  }
50
- return seen.splice(seen.indexOf(node), 1), "{" + out.join(",") + indent + "}";
51
50
  }
51
+ return seen.splice(seen.indexOf(node), 1), "{" + out.join(",") + indent + "}";
52
52
  }
53
53
  })({ "": obj }, "", obj, 0);
54
54
  };
@@ -441,7 +441,7 @@ function assertInvalidTestCaseLocationIsCorrect(diagnostic, error, test) {
441
441
  let actualLocation = {}, expectedLocation = {}, columnOffset = +(test.eslintCompat === !0);
442
442
  ObjectHasOwn(error, "line") && (actualLocation.line = diagnostic.line, expectedLocation.line = error.line), ObjectHasOwn(error, "column") && (actualLocation.column = diagnostic.column + columnOffset, expectedLocation.column = error.column);
443
443
  let canVoidEndLocation = test.eslintCompat === !0 && diagnostic.endLine === diagnostic.line && diagnostic.endColumn === diagnostic.column;
444
- ObjectHasOwn(error, "endLine") && (error.endLine === void 0 && canVoidEndLocation ? actualLocation.endLine = void 0 : actualLocation.endLine = diagnostic.endLine, expectedLocation.endLine = error.endLine), ObjectHasOwn(error, "endColumn") && (error.endColumn === void 0 && canVoidEndLocation ? actualLocation.endColumn = void 0 : actualLocation.endColumn = diagnostic.endColumn + columnOffset, expectedLocation.endColumn = error.endColumn), ObjectKeys(expectedLocation).length > 0 && assert.deepStrictEqual(actualLocation, expectedLocation, "Actual error location does not match expected error location.");
444
+ ObjectHasOwn(error, "endLine") && (actualLocation.endLine = error.endLine === void 0 && canVoidEndLocation ? void 0 : diagnostic.endLine, expectedLocation.endLine = error.endLine), ObjectHasOwn(error, "endColumn") && (actualLocation.endColumn = error.endColumn === void 0 && canVoidEndLocation ? void 0 : diagnostic.endColumn + columnOffset, expectedLocation.endColumn = error.endColumn), ObjectKeys(expectedLocation).length > 0 && assert.deepStrictEqual(actualLocation, expectedLocation, "Actual error location does not match expected error location.");
445
445
  }
446
446
  /**
447
447
  * Assert that suggestions reported by the rule under test match expected suggestions.
@@ -644,7 +644,7 @@ function lint(test, plugin) {
644
644
  };
645
645
  });
646
646
  } finally {
647
- registeredRules.length = 0, allOptions !== null && (allOptions.length = 1), resetStateAfterError();
647
+ registeredRules.length = 0, registeredPluginNames.clear(), allOptions !== null && (allOptions.length = 1), resetStateAfterError();
648
648
  }
649
649
  }
650
650
  /**
package/dist/plugins.js CHANGED
@@ -1,4 +1,4 @@
1
- import { a as loadPlugin, l as setOptions, n as lintFile } from "./lint.js";
1
+ import { a as loadPlugin, n as lintFile, u as setOptions } from "./lint.js";
2
2
  import { t as getErrorMessage } from "./utils.js";
3
3
  //#region src-js/plugins/config.ts
4
4
  /**
@@ -15,7 +15,8 @@ function createWorkspace(workspaceUri) {
15
15
  workspaces.set(workspaceUri, {
16
16
  cwd: "",
17
17
  allOptions: [],
18
- rules: []
18
+ rules: [],
19
+ pluginNames: /* @__PURE__ */ new Set()
19
20
  }), currentWorkspace = null, currentWorkspaceUri = null;
20
21
  }
21
22
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oxlint",
3
- "version": "1.75.0",
3
+ "version": "1.77.0",
4
4
  "description": "Linter for the JavaScript Oxidation Compiler",
5
5
  "keywords": [
6
6
  "eslint",
@@ -87,24 +87,24 @@
87
87
  },
88
88
  "preferUnplugged": true,
89
89
  "optionalDependencies": {
90
- "@oxlint/binding-darwin-arm64": "1.75.0",
91
- "@oxlint/binding-android-arm64": "1.75.0",
92
- "@oxlint/binding-win32-arm64-msvc": "1.75.0",
93
- "@oxlint/binding-linux-arm64-gnu": "1.75.0",
94
- "@oxlint/binding-linux-arm64-musl": "1.75.0",
95
- "@oxlint/binding-openharmony-arm64": "1.75.0",
96
- "@oxlint/binding-android-arm-eabi": "1.75.0",
97
- "@oxlint/binding-linux-arm-gnueabihf": "1.75.0",
98
- "@oxlint/binding-linux-arm-musleabihf": "1.75.0",
99
- "@oxlint/binding-win32-ia32-msvc": "1.75.0",
100
- "@oxlint/binding-linux-ppc64-gnu": "1.75.0",
101
- "@oxlint/binding-linux-riscv64-gnu": "1.75.0",
102
- "@oxlint/binding-linux-riscv64-musl": "1.75.0",
103
- "@oxlint/binding-linux-s390x-gnu": "1.75.0",
104
- "@oxlint/binding-darwin-x64": "1.75.0",
105
- "@oxlint/binding-win32-x64-msvc": "1.75.0",
106
- "@oxlint/binding-freebsd-x64": "1.75.0",
107
- "@oxlint/binding-linux-x64-gnu": "1.75.0",
108
- "@oxlint/binding-linux-x64-musl": "1.75.0"
90
+ "@oxlint/binding-darwin-arm64": "1.77.0",
91
+ "@oxlint/binding-android-arm64": "1.77.0",
92
+ "@oxlint/binding-win32-arm64-msvc": "1.77.0",
93
+ "@oxlint/binding-linux-arm64-gnu": "1.77.0",
94
+ "@oxlint/binding-linux-arm64-musl": "1.77.0",
95
+ "@oxlint/binding-openharmony-arm64": "1.77.0",
96
+ "@oxlint/binding-android-arm-eabi": "1.77.0",
97
+ "@oxlint/binding-linux-arm-gnueabihf": "1.77.0",
98
+ "@oxlint/binding-linux-arm-musleabihf": "1.77.0",
99
+ "@oxlint/binding-win32-ia32-msvc": "1.77.0",
100
+ "@oxlint/binding-linux-ppc64-gnu": "1.77.0",
101
+ "@oxlint/binding-linux-riscv64-gnu": "1.77.0",
102
+ "@oxlint/binding-linux-riscv64-musl": "1.77.0",
103
+ "@oxlint/binding-linux-s390x-gnu": "1.77.0",
104
+ "@oxlint/binding-darwin-x64": "1.77.0",
105
+ "@oxlint/binding-win32-x64-msvc": "1.77.0",
106
+ "@oxlint/binding-freebsd-x64": "1.77.0",
107
+ "@oxlint/binding-linux-x64-gnu": "1.77.0",
108
+ "@oxlint/binding-linux-x64-musl": "1.77.0"
109
109
  }
110
110
  }