Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions website/components/Image.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -123,20 +123,20 @@ const optmizeShopify = (opts: OptimizationOptions) => {
};

const optimizeVTEX = (opts: OptimizationOptions) => {
const { originalSrc, width, height } = opts;
const { originalSrc, width } = opts;

const src = new URL(originalSrc);

const [slash, arquivos, ids, rawId, ...rest] = src.pathname.split("/");
const [trueId, _w, _h] = rawId.split("-");
const [trueId] = rawId.split("-");

src.pathname = [
slash,
arquivos,
ids,
`${trueId}-${width}-${height}`,
...rest,
].join("/");
slash,
arquivos,
ids,
`${trueId}-${width}-0`,
...rest]
.join("/");
Comment on lines +134 to +139

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Fix formatting to unblock CI (deno fmt --check).

Line 134-Line 139 is currently failing formatter checks in pipeline; please reformat this block.

Proposed formatting fix
-  src.pathname = [
-    slash, 
-    arquivos, 
-    ids, 
-    `${trueId}-${width}-0`,
-    ...rest]
-    .join("/");
+  src.pathname = [
+    slash,
+    arquivos,
+    ids,
+    `${trueId}-${width}-0`,
+    ...rest,
+  ].join("/");
🧰 Tools
🪛 GitHub Actions: ci / 0_Bundle & Check Apps (ubuntu-latest).txt

[error] 134-139: deno fmt --check failed. Found 1 not formatted file in 2108 files. Formatting issue reported at this section.

🪛 GitHub Actions: ci / Bundle & Check Apps (ubuntu-latest)

[error] 134-139: deno fmt --check failed: Found 1 not formatted file in 2108 files.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@website/components/Image.tsx` around lines 134 - 139, Reformat the array join
expression that builds the image path so it matches deno fmt style: ensure each
array element (slash, arquivos, ids, `${trueId}-${width}-0`, ...rest) is
properly comma-separated and the closing ] and .join("/") are on the correct
lines, preserving the same values and variables (trueId, width, arquivos, ids,
rest) but adjusting whitespace/line breaks to satisfy the formatter.


return src.href;
};
Expand Down
Loading