From 479f1bbd0e2a3eadcc3e807e24e931e7b02fd828 Mon Sep 17 00:00:00 2001 From: Bas van den Aakster Date: Wed, 17 Sep 2025 20:09:47 +0200 Subject: [PATCH] Fix ESLint issues and remove unnecessary type assertions --- src/collections/payments.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/collections/payments.ts b/src/collections/payments.ts index 06c40a1..f1e8de3 100644 --- a/src/collections/payments.ts +++ b/src/collections/payments.ts @@ -1,9 +1,9 @@ -import type { AccessArgs, CollectionBeforeChangeHook, CollectionConfig, CollectionSlug, Field } from 'payload' +import type { AccessArgs, CollectionBeforeChangeHook, CollectionConfig, Field } from 'payload' import type { BillingPluginConfig} from '@/plugin/config'; import { defaults } from '@/plugin/config' -import { extractSlug, toPayloadId } from '@/plugin/utils' +import { extractSlug } from '@/plugin/utils' import { isWebhookRequest } from '@/providers/context' -import { Payment } from '@/plugin/types/payments' +import type { Payment } from '@/plugin/types/payments' import { initProviderPayment } from '@/collections/hooks' export function createPaymentsCollection(pluginConfig: BillingPluginConfig): CollectionConfig { @@ -80,7 +80,7 @@ export function createPaymentsCollection(pluginConfig: BillingPluginConfig): Col admin: { position: 'sidebar', }, - relationTo: extractSlug(pluginConfig.collections?.invoices || defaults.invoicesCollection) as CollectionSlug, + relationTo: extractSlug(pluginConfig.collections?.invoices || defaults.invoicesCollection), }, { name: 'metadata', @@ -105,7 +105,7 @@ export function createPaymentsCollection(pluginConfig: BillingPluginConfig): Col readOnly: true, }, hasMany: true, - relationTo: extractSlug(pluginConfig.collections?.refunds || defaults.refundsCollection) as CollectionSlug, + relationTo: extractSlug(pluginConfig.collections?.refunds || defaults.refundsCollection), }, { name: 'version',