Skip to content

Commit 4694478

Browse files
(SP 1) [FIX] set up eslint/prettier + stabilize formatting workflow (own files only) (#264)
* (SP 2) [Shop UI] Unify storefront styles across components and interactions * (SP 1) [Shop UI] Add page metadata across shop routes * (SP 1) [FIX] names of components, replacing tests, clean code * (SP 1) [FIX] remove magic constant and align restock sweep test typing * (SP 1) [FIX] remove duplicate * (SP 1) [FIX] set up eslint/prettier + stabilize formatting workflow (own files only) * (SP 1) [FIX] Tailwind hints * (SP 1) [FIX] Tailwind hints revert
1 parent 601e032 commit 4694478

42 files changed

Lines changed: 71 additions & 64 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

frontend/app/[locale]/shop/admin/products/[id]/edit/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { z } from 'zod';
55

66
import { ShopAdminTopbar } from '@/components/shop/admin/ShopAdminTopbar';
77
import { db } from '@/db';
8-
import { productPrices,products } from '@/db/schema';
8+
import { productPrices, products } from '@/db/schema';
99
import { guardShopAdminPage } from '@/lib/auth/guard-shop-admin-page';
1010
import { issueCsrfToken } from '@/lib/security/csrf';
1111
import type { CurrencyCode } from '@/lib/shop/currency';

frontend/app/[locale]/shop/admin/products/page.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@ export default async function AdminProductsPage({
399399
<div className="grid grid-cols-2 gap-2">
400400
<Link
401401
href={`/shop/products/${row.slug}`}
402-
className="border-border text-foreground hover:bg-secondary inline-flex items-center justify-center rounded-md border px-2 py-1 text-center text-xs leading-tight font-medium break-words whitespace-normal transition-colors"
402+
className="border-border text-foreground hover:bg-secondary break-words inline-flex items-center justify-center rounded-md border px-2 py-1 text-center text-xs leading-tight font-medium whitespace-normal transition-colors"
403403
aria-label={t('actions.viewProduct', {
404404
title: row.title,
405405
})}
@@ -409,7 +409,7 @@ export default async function AdminProductsPage({
409409

410410
<Link
411411
href={`/shop/admin/products/${row.id}/edit`}
412-
className="border-border text-foreground hover:bg-secondary inline-flex items-center justify-center rounded-md border px-2 py-1 text-center text-xs leading-tight font-medium break-words whitespace-normal transition-colors"
412+
className="border-border text-foreground hover:bg-secondary break-words inline-flex items-center justify-center rounded-md border px-2 py-1 text-center text-xs leading-tight font-medium whitespace-normal transition-colors"
413413
aria-label={t('actions.editProduct', {
414414
title: row.title,
415415
})}

frontend/app/[locale]/shop/cart/CartPageClient.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
'use client';
22

3-
import { Minus, Plus, ShoppingBag,Trash2 } from 'lucide-react';
3+
import { Minus, Plus, ShoppingBag, Trash2 } from 'lucide-react';
44
import Image from 'next/image';
55
import { useParams } from 'next/navigation';
66
import { useTranslations } from 'next-intl';
77
import { useState } from 'react';
88

99
import { useCart } from '@/components/shop/CartProvider';
10-
import { Link,useRouter } from '@/i18n/routing';
10+
import { Link, useRouter } from '@/i18n/routing';
1111
import { formatMoney } from '@/lib/shop/currency';
1212
import { generateIdempotencyKey } from '@/lib/shop/idempotency';
1313
import {

frontend/app/[locale]/shop/orders/[id]/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { orderItems, orders } from '@/db/schema';
1111
import { Link } from '@/i18n/routing';
1212
import { getCurrentUser } from '@/lib/auth';
1313
import { logError } from '@/lib/logging';
14-
import { type CurrencyCode,formatMoney } from '@/lib/shop/currency';
14+
import { type CurrencyCode, formatMoney } from '@/lib/shop/currency';
1515
import { fromDbMoney } from '@/lib/shop/money';
1616
import {
1717
SHOP_FOCUS,

frontend/app/api/shop/admin/orders/[id]/refund/route.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import {
1111
import { logError, logWarn } from '@/lib/logging';
1212
import { requireAdminCsrf } from '@/lib/security/admin-csrf';
1313
import { guardBrowserSameOrigin } from '@/lib/security/origin';
14-
import { InvalidPayloadError,OrderNotFoundError } from '@/lib/services/errors';
14+
import { InvalidPayloadError, OrderNotFoundError } from '@/lib/services/errors';
1515
import { refundOrder } from '@/lib/services/orders';
1616
import { orderIdParamSchema, orderSummarySchema } from '@/lib/validation/shop';
1717

frontend/app/api/shop/webhooks/stripe/route.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import crypto from 'node:crypto';
22

3-
import { and, eq, isNull, lt,ne, or } from 'drizzle-orm';
3+
import { and, eq, isNull, lt, ne, or } from 'drizzle-orm';
44
import { NextRequest, NextResponse } from 'next/server';
55
import Stripe from 'stripe';
66

77
import { db } from '@/db';
88
import { orders, stripeEvents } from '@/db/schema';
99
import { logError, logInfo, logWarn } from '@/lib/logging';
10-
import { retrieveCharge,verifyWebhookSignature } from '@/lib/psp/stripe';
10+
import { retrieveCharge, verifyWebhookSignature } from '@/lib/psp/stripe';
1111
import { guardNonBrowserOnly } from '@/lib/security/origin';
1212
import {
1313
enforceRateLimit,

frontend/components/shop/CatalogProductsClient.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use client';
22

3-
import { type ReadonlyURLSearchParams,useSearchParams } from 'next/navigation';
3+
import { type ReadonlyURLSearchParams, useSearchParams } from 'next/navigation';
44
import { useTranslations } from 'next-intl';
55
import React from 'react';
66

frontend/components/shop/header/NavLinks.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ export function NavLinks({
8383
href="/"
8484
onClick={onNavigate}
8585
icon={Home}
86-
className={cn(isHomeActive && '[color:var(--accent-primary)]')}
86+
className={cn(isHomeActive && 'text-(--accent-primary)')}
8787
>
8888
{tNav('home')}
8989
</HeaderButton>

frontend/db/queries/shop/products.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ import {
1111
} from 'drizzle-orm';
1212

1313
import { db } from '@/db';
14-
import { productPrices,products } from '@/db/schema';
14+
import { productPrices, products } from '@/db/schema';
1515
import type { CatalogSort } from '@/lib/config/catalog';
1616
import type { CurrencyCode } from '@/lib/shop/currency';
17-
import { type DbProduct,dbProductSchema } from '@/lib/validation/shop';
17+
import { type DbProduct, dbProductSchema } from '@/lib/validation/shop';
1818

1919
const publicProductBaseSelect = {
2020
id: products.id,

frontend/lib/admin/parseAdminProductForm.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { z } from 'zod';
22

3-
import { type CurrencyCode,currencyValues } from '@/lib/shop/currency';
3+
import { type CurrencyCode, currencyValues } from '@/lib/shop/currency';
44
import { toCents } from '@/lib/shop/money';
55
import {
66
productAdminSchema,

0 commit comments

Comments
 (0)