oxlint-plugin-vize 0.120.0 → 0.123.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 CHANGED
@@ -67,18 +67,18 @@ function collectVueFilesFromTarget(cwd, target) {
67
67
  cwd,
68
68
  withFileTypes: false,
69
69
  exclude: ["**/node_modules/**", "**/.git/**"]
70
- }).map((entry) => path.resolve(cwd, entry)).filter(isVueFile);
70
+ }).map((entry) => path.resolve(cwd, entry)).filter(isSupportedLintFile);
71
71
  const absoluteTarget = path.resolve(cwd, target);
72
72
  if (!fs.existsSync(absoluteTarget)) return [];
73
- if (fs.statSync(absoluteTarget).isDirectory()) return fs.globSync("**/*.vue", {
73
+ if (fs.statSync(absoluteTarget).isDirectory()) return fs.globSync("**/*", {
74
74
  cwd: absoluteTarget,
75
75
  withFileTypes: false,
76
76
  exclude: ["**/node_modules/**", "**/.git/**"]
77
- }).map((entry) => path.resolve(absoluteTarget, entry));
78
- return isVueFile(absoluteTarget) ? [absoluteTarget] : [];
77
+ }).map((entry) => path.resolve(absoluteTarget, entry)).filter(isSupportedLintFile);
78
+ return isSupportedLintFile(absoluteTarget) ? [absoluteTarget] : [];
79
79
  }
80
- function isVueFile(filename) {
81
- return filename.endsWith(".vue");
80
+ function isSupportedLintFile(filename) {
81
+ return filename.endsWith(".vue") || filename.endsWith(".html") || filename.endsWith(".htm");
82
82
  }
83
83
  //#endregion
84
84
  //#region src/cli/oxlint.ts
@@ -131,9 +131,11 @@ function prepareScriptlessWorkaroundFiles(cwd, filenames) {
131
131
  let counter = 0;
132
132
  for (const filename of filenames) {
133
133
  const source = fs.readFileSync(filename, "utf8");
134
- if (hasScriptLikeBlock(source)) continue;
134
+ const isStandaloneHtml = isStandaloneHtmlFile(filename);
135
+ if (!isStandaloneHtml && hasScriptLikeBlock(source)) continue;
135
136
  const relativeFilename = path.relative(cwd, filename);
136
- const tempFilename = path.join(tempDir, `${counter}-${path.basename(filename)}`);
137
+ const tempBasename = isStandaloneHtml ? `${path.basename(filename)}.vue` : path.basename(filename);
138
+ const tempFilename = path.join(tempDir, `${counter}-${tempBasename}`);
137
139
  counter += 1;
138
140
  fs.mkdirSync(path.dirname(tempFilename), { recursive: true });
139
141
  fs.writeFileSync(tempFilename, appendScriptlessWorkaround(source, filename));
@@ -157,6 +159,9 @@ function prepareScriptlessWorkaroundFiles(cwd, filenames) {
157
159
  function toCliPath(filename) {
158
160
  return filename.split(path.sep).join("/");
159
161
  }
162
+ function isStandaloneHtmlFile(filename) {
163
+ return filename.endsWith(".html") || filename.endsWith(".htm");
164
+ }
160
165
  function registerPathReplacementVariants(replacements, cwd, tempFilename, originalFilename) {
161
166
  const relativeTempFilename = path.relative(cwd, tempFilename);
162
167
  const relativeOriginalFilename = getReportedOriginalFilename(cwd, originalFilename);
@@ -193,7 +198,7 @@ async function main() {
193
198
  const stderr = rewriteReportedPaths(result.stderr, prepared.pathReplacements);
194
199
  if (stdout) await writeStream(process.stdout, stdout);
195
200
  if (stderr) await writeStream(process.stderr, stderr);
196
- if (prepared.usedScriptlessWorkaround && forwardedArgs.includes("--fix")) await writeStream(process.stderr, "\n[oxlint-plugin-vize] Scriptless SFC workaround is active; fixes are not applied back to original .vue files yet.\n");
201
+ if (prepared.usedScriptlessWorkaround && forwardedArgs.includes("--fix")) await writeStream(process.stderr, "\n[oxlint-plugin-vize] Temporary Vue workaround is active; fixes are not applied back to original files yet.\n");
197
202
  process.exitCode = result.status ?? 1;
198
203
  } finally {
199
204
  prepared.cleanup();
package/dist/index.mjs CHANGED
@@ -159,7 +159,7 @@ const PRESET_ALIASES = new Map([
159
159
  ["nuxt", "nuxt"]
160
160
  ]);
161
161
  function isVueLikeFile(filename) {
162
- return filename.endsWith(".vue");
162
+ return filename.endsWith(".vue") || filename.endsWith(".html") || filename.endsWith(".htm");
163
163
  }
164
164
  function getVizeSettings(context) {
165
165
  const settings = context.settings;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oxlint-plugin-vize",
3
- "version": "0.120.0",
3
+ "version": "0.123.0",
4
4
  "description": "Oxlint JS plugin bridge for Vize Patina",
5
5
  "keywords": [
6
6
  "lint",
@@ -44,21 +44,21 @@
44
44
  "devDependencies": {
45
45
  "@tsdown/css": "0.22.0",
46
46
  "@types/node": "25.7.0",
47
- "@vizejs/native": "0.120.0",
47
+ "@vizejs/native": "0.123.0",
48
48
  "tsdown": "0.22.0",
49
49
  "typescript": "6.0.3",
50
50
  "vite": "npm:@voidzero-dev/vite-plus-core@0.1.21",
51
51
  "vite-plus": "0.1.21"
52
52
  },
53
53
  "optionalDependencies": {
54
- "@vizejs/native-darwin-arm64": "0.120.0",
55
- "@vizejs/native-darwin-x64": "0.120.0",
56
- "@vizejs/native-linux-arm64-gnu": "0.120.0",
57
- "@vizejs/native-linux-arm64-musl": "0.120.0",
58
- "@vizejs/native-linux-x64-gnu": "0.120.0",
59
- "@vizejs/native-linux-x64-musl": "0.120.0",
60
- "@vizejs/native-win32-arm64-msvc": "0.120.0",
61
- "@vizejs/native-win32-x64-msvc": "0.120.0"
54
+ "@vizejs/native-darwin-arm64": "0.123.0",
55
+ "@vizejs/native-darwin-x64": "0.123.0",
56
+ "@vizejs/native-linux-arm64-gnu": "0.123.0",
57
+ "@vizejs/native-linux-arm64-musl": "0.123.0",
58
+ "@vizejs/native-linux-x64-gnu": "0.123.0",
59
+ "@vizejs/native-linux-x64-musl": "0.123.0",
60
+ "@vizejs/native-win32-arm64-msvc": "0.123.0",
61
+ "@vizejs/native-win32-x64-msvc": "0.123.0"
62
62
  },
63
63
  "engines": {
64
64
  "node": ">=24"