oxlint 1.76.0 → 1.78.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 +286 -21
- package/dist/bindings.js +391 -326
- package/dist/index.d.ts +105 -9
- package/dist/lint.js +1013 -818
- package/dist/plugins-dev.d.ts +1 -1
- package/dist/plugins-dev.js +15 -15
- package/dist/plugins.js +1 -1
- package/dist/workspace2.js +2 -1
- package/package.json +20 -20
package/dist/plugins-dev.d.ts
CHANGED
|
@@ -2440,6 +2440,7 @@ interface TSTypePredicate extends Span {
|
|
|
2440
2440
|
parent: Node;
|
|
2441
2441
|
}
|
|
2442
2442
|
type TSTypePredicateName = IdentifierName | TSThisType;
|
|
2443
|
+
type TSModuleDeclarationKind = "module" | "namespace";
|
|
2443
2444
|
interface TSModuleDeclaration extends Span {
|
|
2444
2445
|
type: "TSModuleDeclaration";
|
|
2445
2446
|
id: BindingIdentifier | StringLiteral | TSQualifiedName;
|
|
@@ -2449,7 +2450,6 @@ interface TSModuleDeclaration extends Span {
|
|
|
2449
2450
|
global: false;
|
|
2450
2451
|
parent: Node;
|
|
2451
2452
|
}
|
|
2452
|
-
type TSModuleDeclarationKind = "module" | "namespace";
|
|
2453
2453
|
interface TSGlobalDeclaration extends Span {
|
|
2454
2454
|
type: "TSModuleDeclaration";
|
|
2455
2455
|
id: IdentifierName;
|
package/dist/plugins-dev.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
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
|
-
}
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
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 ?
|
|
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
package/dist/workspace2.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "oxlint",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.78.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.
|
|
91
|
-
"@oxlint/binding-android-arm64": "1.
|
|
92
|
-
"@oxlint/binding-win32-arm64-msvc": "1.
|
|
93
|
-
"@oxlint/binding-linux-arm64-gnu": "1.
|
|
94
|
-
"@oxlint/binding-linux-arm64-musl": "1.
|
|
95
|
-
"@oxlint/binding-openharmony-arm64": "1.
|
|
96
|
-
"@oxlint/binding-android-arm-eabi": "1.
|
|
97
|
-
"@oxlint/binding-linux-arm-gnueabihf": "1.
|
|
98
|
-
"@oxlint/binding-linux-arm-musleabihf": "1.
|
|
99
|
-
"@oxlint/binding-win32-ia32-msvc": "1.
|
|
100
|
-
"@oxlint/binding-linux-ppc64-gnu": "1.
|
|
101
|
-
"@oxlint/binding-linux-riscv64-gnu": "1.
|
|
102
|
-
"@oxlint/binding-linux-riscv64-musl": "1.
|
|
103
|
-
"@oxlint/binding-linux-s390x-gnu": "1.
|
|
104
|
-
"@oxlint/binding-darwin-x64": "1.
|
|
105
|
-
"@oxlint/binding-win32-x64-msvc": "1.
|
|
106
|
-
"@oxlint/binding-freebsd-x64": "1.
|
|
107
|
-
"@oxlint/binding-linux-x64-gnu": "1.
|
|
108
|
-
"@oxlint/binding-linux-x64-musl": "1.
|
|
90
|
+
"@oxlint/binding-darwin-arm64": "1.78.0",
|
|
91
|
+
"@oxlint/binding-android-arm64": "1.78.0",
|
|
92
|
+
"@oxlint/binding-win32-arm64-msvc": "1.78.0",
|
|
93
|
+
"@oxlint/binding-linux-arm64-gnu": "1.78.0",
|
|
94
|
+
"@oxlint/binding-linux-arm64-musl": "1.78.0",
|
|
95
|
+
"@oxlint/binding-openharmony-arm64": "1.78.0",
|
|
96
|
+
"@oxlint/binding-android-arm-eabi": "1.78.0",
|
|
97
|
+
"@oxlint/binding-linux-arm-gnueabihf": "1.78.0",
|
|
98
|
+
"@oxlint/binding-linux-arm-musleabihf": "1.78.0",
|
|
99
|
+
"@oxlint/binding-win32-ia32-msvc": "1.78.0",
|
|
100
|
+
"@oxlint/binding-linux-ppc64-gnu": "1.78.0",
|
|
101
|
+
"@oxlint/binding-linux-riscv64-gnu": "1.78.0",
|
|
102
|
+
"@oxlint/binding-linux-riscv64-musl": "1.78.0",
|
|
103
|
+
"@oxlint/binding-linux-s390x-gnu": "1.78.0",
|
|
104
|
+
"@oxlint/binding-darwin-x64": "1.78.0",
|
|
105
|
+
"@oxlint/binding-win32-x64-msvc": "1.78.0",
|
|
106
|
+
"@oxlint/binding-freebsd-x64": "1.78.0",
|
|
107
|
+
"@oxlint/binding-linux-x64-gnu": "1.78.0",
|
|
108
|
+
"@oxlint/binding-linux-x64-musl": "1.78.0"
|
|
109
109
|
}
|
|
110
110
|
}
|