oxlint-plugin-vize 0.712.0 → 0.714.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/dist/cli.mjs +27 -9
- package/package.json +19 -11
package/dist/cli.mjs
CHANGED
|
@@ -389,8 +389,7 @@ function prepareScriptlessWorkaroundFiles(cwd, filenames) {
|
|
|
389
389
|
}
|
|
390
390
|
function registerLocationVariants(locations, cwd, filename, map) {
|
|
391
391
|
for (const name of [
|
|
392
|
-
filename,
|
|
393
|
-
toCliPath$1(filename),
|
|
392
|
+
...reportedPathVariants(filename),
|
|
394
393
|
path.relative(cwd, filename),
|
|
395
394
|
toCliPath$1(path.relative(cwd, filename))
|
|
396
395
|
]) locations.set(name, map);
|
|
@@ -420,8 +419,7 @@ function registerPathReplacementVariants(replacements, cwd, tempFilename, origin
|
|
|
420
419
|
const relativeTempFilename = path.relative(cwd, tempFilename);
|
|
421
420
|
const relativeOriginalFilename = getReportedOriginalFilename(cwd, originalFilename);
|
|
422
421
|
const variants = new Set([
|
|
423
|
-
[
|
|
424
|
-
[toCliPath$1(tempFilename), toCliPath$1(relativeOriginalFilename)],
|
|
422
|
+
...reportedPathVariants(tempFilename).map((name) => [name, name.includes("/") ? toCliPath$1(relativeOriginalFilename) : relativeOriginalFilename]),
|
|
425
423
|
[relativeTempFilename, relativeOriginalFilename],
|
|
426
424
|
[toCliPath$1(relativeTempFilename), toCliPath$1(relativeOriginalFilename)]
|
|
427
425
|
]);
|
|
@@ -435,6 +433,21 @@ function getReportedOriginalFilename(cwd, filename) {
|
|
|
435
433
|
if (relativeFilename && !relativeFilename.startsWith(`..${path.sep}`) && relativeFilename !== ".." && !path.isAbsolute(relativeFilename)) return relativeFilename;
|
|
436
434
|
return filename;
|
|
437
435
|
}
|
|
436
|
+
function reportedPathVariants(filename) {
|
|
437
|
+
const paths = new Set([filename]);
|
|
438
|
+
try {
|
|
439
|
+
paths.add(fs.realpathSync.native(filename));
|
|
440
|
+
} catch {}
|
|
441
|
+
const variants = /* @__PURE__ */ new Set();
|
|
442
|
+
for (const candidate of paths) {
|
|
443
|
+
const namespaced = path.win32.isAbsolute(candidate) ? path.win32.toNamespacedPath(candidate) : path.toNamespacedPath(candidate);
|
|
444
|
+
variants.add(candidate);
|
|
445
|
+
variants.add(toCliPath$1(candidate));
|
|
446
|
+
variants.add(namespaced);
|
|
447
|
+
variants.add(toCliPath$1(namespaced));
|
|
448
|
+
}
|
|
449
|
+
return [...variants];
|
|
450
|
+
}
|
|
438
451
|
//#endregion
|
|
439
452
|
//#region src/cli/scoped-config.ts
|
|
440
453
|
const CONFIG_NAMES = [
|
|
@@ -503,16 +516,17 @@ function validateNestedConfigs(config, files) {
|
|
|
503
516
|
}
|
|
504
517
|
}
|
|
505
518
|
}
|
|
506
|
-
function validateScopedConfig(config, args) {
|
|
519
|
+
function validateScopedConfig(config, args, platform = process.platform) {
|
|
507
520
|
const value = config.value;
|
|
508
|
-
|
|
521
|
+
const hasPortableWindowsRoot = platform === "win32" && path.win32.isAbsolute(config.file) && !hasPathSelection(value);
|
|
522
|
+
if (path.parse(config.file).root !== "/" && !hasPortableWindowsRoot) throw new Error("Scoped Vue transport cannot preserve non-POSIX filesystem roots.");
|
|
509
523
|
if (!config.module && value.extends != null && (!Array.isArray(value.extends) || value.extends.length !== 0)) throw new Error("Scoped Vue transport cannot preserve inherited configs; use a complete JSON config.");
|
|
510
524
|
if (config.module && value.extends != null) {
|
|
511
525
|
if (!Array.isArray(value.extends) || value.extends.some((parent) => !isRecord$1(parent))) throw new Error("Scoped Vue transport requires config objects in TypeScript extends.");
|
|
512
526
|
for (const parent of value.extends) validateScopedConfig({
|
|
513
527
|
...config,
|
|
514
528
|
value: parent
|
|
515
|
-
}, args);
|
|
529
|
+
}, args, platform);
|
|
516
530
|
}
|
|
517
531
|
if (args.includes("--cwd") || args.some((arg) => arg.startsWith("--cwd="))) throw new Error("Scoped Vue transport requires the process cwd; remove --cwd.");
|
|
518
532
|
if (args.some((arg) => [
|
|
@@ -522,8 +536,9 @@ function validateScopedConfig(config, args) {
|
|
|
522
536
|
].includes(arg)) || isRecord$1(value.options) && (value.options.typeAware || value.options.typeCheck)) throw new Error("Scoped Vue transport cannot preserve Oxlint's type-aware project graph.");
|
|
523
537
|
if (args.some((arg) => ["--import-plugin", "--tsconfig"].includes(arg) || arg.startsWith("--import-plugin=") || arg.startsWith("--tsconfig=")) || Array.isArray(value.plugins) && value.plugins.includes("import") || Array.isArray(value.overrides) && value.overrides.some((row) => isRecord$1(row) && Array.isArray(row.plugins) && row.plugins.includes("import"))) throw new Error("Scoped Vue transport cannot preserve Oxlint's import/project resolution.");
|
|
524
538
|
}
|
|
525
|
-
function validateSelectionPaths(cwd, candidates) {
|
|
526
|
-
|
|
539
|
+
function validateSelectionPaths(cwd, candidates, platform = process.platform) {
|
|
540
|
+
const ambiguous = platform === "win32" ? /[\r\n]/u : /[\r\n\\]/u;
|
|
541
|
+
if (ambiguous.test(cwd) || [...candidates].some((file) => ambiguous.test(file))) throw new Error("Scoped Vue transport cannot preserve filenames containing CR, LF or backslash.");
|
|
527
542
|
if (fs.existsSync(path.join(cwd, "oxlint-suppressions.json"))) throw new Error("Scoped Vue transport cannot preserve path-sensitive suppression state.");
|
|
528
543
|
}
|
|
529
544
|
function createScopedMirror(cwd, config, files) {
|
|
@@ -621,6 +636,9 @@ function createScopedMirror(cwd, config, files) {
|
|
|
621
636
|
function isRecord$1(value) {
|
|
622
637
|
return typeof value === "object" && value != null && !Array.isArray(value);
|
|
623
638
|
}
|
|
639
|
+
function hasPathSelection(value) {
|
|
640
|
+
return value.ignorePatterns != null || value.overrides != null || Array.isArray(value.extends) && value.extends.some((parent) => isRecord$1(parent) && hasPathSelection(parent));
|
|
641
|
+
}
|
|
624
642
|
function strings(value) {
|
|
625
643
|
if (value == null) return [];
|
|
626
644
|
if (!Array.isArray(value) || value.some((item) => typeof item !== "string")) throw new Error("Scoped Vue transport requires string-array override patterns.");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "oxlint-plugin-vize",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.714.0",
|
|
4
4
|
"description": "Oxlint JS plugin bridge for Vize Patina",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"lint",
|
|
@@ -46,23 +46,31 @@
|
|
|
46
46
|
"@oxlint/plugins": "1.78.0"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
|
+
"@nuxt/eslint": "1.16.0",
|
|
50
|
+
"@nuxt/eslint-config": "1.16.0",
|
|
49
51
|
"@tsdown/css": "0.22.14",
|
|
50
52
|
"@types/node": "25.9.2",
|
|
51
|
-
"@
|
|
53
|
+
"@typescript-eslint/parser": "8.65.0",
|
|
54
|
+
"@vizejs/native": "0.714.0",
|
|
55
|
+
"ajv": "8.20.0",
|
|
56
|
+
"eslint": "10.13.0",
|
|
57
|
+
"eslint-plugin-vue": "10.9.2",
|
|
58
|
+
"oxlint": "1.78.0",
|
|
52
59
|
"tsdown": "0.22.14",
|
|
53
60
|
"typescript": "6.0.3",
|
|
54
61
|
"vite": "npm:@voidzero-dev/vite-plus-core@0.1.24",
|
|
55
|
-
"vite-plus": "0.1.24"
|
|
62
|
+
"vite-plus": "0.1.24",
|
|
63
|
+
"vue-eslint-parser": "10.4.1"
|
|
56
64
|
},
|
|
57
65
|
"optionalDependencies": {
|
|
58
|
-
"@vizejs/native-darwin-arm64": "0.
|
|
59
|
-
"@vizejs/native-darwin-x64": "0.
|
|
60
|
-
"@vizejs/native-linux-arm64-gnu": "0.
|
|
61
|
-
"@vizejs/native-linux-arm64-musl": "0.
|
|
62
|
-
"@vizejs/native-linux-x64-gnu": "0.
|
|
63
|
-
"@vizejs/native-linux-x64-musl": "0.
|
|
64
|
-
"@vizejs/native-win32-arm64-msvc": "0.
|
|
65
|
-
"@vizejs/native-win32-x64-msvc": "0.
|
|
66
|
+
"@vizejs/native-darwin-arm64": "0.714.0",
|
|
67
|
+
"@vizejs/native-darwin-x64": "0.714.0",
|
|
68
|
+
"@vizejs/native-linux-arm64-gnu": "0.714.0",
|
|
69
|
+
"@vizejs/native-linux-arm64-musl": "0.714.0",
|
|
70
|
+
"@vizejs/native-linux-x64-gnu": "0.714.0",
|
|
71
|
+
"@vizejs/native-linux-x64-musl": "0.714.0",
|
|
72
|
+
"@vizejs/native-win32-arm64-msvc": "0.714.0",
|
|
73
|
+
"@vizejs/native-win32-x64-msvc": "0.714.0"
|
|
66
74
|
},
|
|
67
75
|
"engines": {
|
|
68
76
|
"node": "^22 || >= 24"
|