[READY] Add product variants system #46
Annotations
12 errors and 1 warning
|
type-check
Process completed with exit code 2.
|
|
type-check:
src/routes/product/product.test.tsx#L35
Type '{ product: ProductType; }' is not assignable to type '{ product?: undefined; categoryWithVariants?: undefined; } | { product: Product; categoryWithVariants: { categoryVariants: { id: number; createdAt: Date; updatedAt: Date; ... 4 more ...; priceModifier: { ...; }; }[]; ... 8 more ...; hasVariants: boolean; } | null; }'.
|
|
type-check:
src/lib/utils.tests.ts#L148
Type '{ id: number; createdAt: Date; updatedAt: Date; title: string; imgSrc: string | null; price: Decimal; productId: number | null; categoryVariantId?: number | null | undefined; quantity: number; orderId: number; variantInfo?: string | ... 1 more ... | undefined; }' does not satisfy the expected type '{ id: number; createdAt: Date; updatedAt: Date; title: string; imgSrc: string | null; price: Decimal; productId: number | null; categoryVariantId: number | null; quantity: number; orderId: number; variantInfo: string | null; }'.
|
|
type-check:
src/lib/utils.tests.ts#L137
Type '{ id: number; createdAt: Date; updatedAt: Date; title: string; imgSrc: string | null; price: Decimal; productId: number | null; categoryVariantId?: number | null | undefined; quantity: number; orderId: number; variantInfo?: string | ... 1 more ... | undefined; }' is not assignable to type '{ id: number; createdAt: Date; updatedAt: Date; title: string; imgSrc: string | null; price: Decimal; productId: number | null; categoryVariantId: number | null; quantity: number; orderId: number; variantInfo: string | null; }'.
|
|
type-check:
src/lib/utils.tests.ts#L132
Type '{ id: number; createdAt: Date; updatedAt: Date; title: string; imgSrc: string | null; productId: number | null; categoryVariantId?: number | null | undefined; quantity: number; orderId: number; variantInfo?: string | ... 1 more ... | undefined; price: number; }' does not satisfy the expected type 'OrderItem'.
|
|
type-check:
src/lib/utils.tests.ts#L121
Type '{ id: number; createdAt: Date; updatedAt: Date; title: string; imgSrc: string | null; productId: number | null; categoryVariantId?: number | null | undefined; quantity: number; orderId: number; variantInfo?: string | ... 1 more ... | undefined; price: number; }' is not assignable to type 'OrderItem'.
|
|
type-check:
src/lib/utils.tests.ts#L90
Type '{ id: number; createdAt: Date; updatedAt: Date; title: string; alt: string | null; imgSrc: string | null; description: string | null; slug: CategorySlug; hasVariants?: boolean | undefined; }' is not assignable to type '{ id: number; createdAt: Date; updatedAt: Date; title: string; alt: string | null; imgSrc: string | null; description: string | null; slug: CategorySlug; hasVariants: boolean; }'.
|
|
lint
Process completed with exit code 1.
|
|
lint:
src/routes/product/index.tsx#L12
`@/services/category.service` import should occur before import of `@/services/product.service`
|
|
lint:
src/routes/product/index.tsx#L11
`react` import should occur before import of `react-router`
|
|
lint:
src/routes/product/index.tsx#L11
There should be at least one empty line between import groups
|
|
lint:
src/routes/product/index.tsx#L10
There should be at least one empty line between import groups
|
|
lint:
src/routes/product/index.tsx#L62
React Hook useEffect has a missing dependency: 'categoryWithVariants.categoryVariants'. Either include it or remove the dependency array
|