mirror of
https://github.com/xtr-dev/payload-billing.git
synced 2025-12-10 10:53:23 +00:00
fix: resolve ESLint errors and warnings
- Add emoji accessibility labels (jsx-a11y/accessible-emoji) - Remove unused imports and variables - Fix async functions without await - Add dev directory to ESLint ignore list - Add eslint-disable comment for necessary console.error - Clean up unused route file All ESLint errors resolved (0 errors, 33 warnings remaining) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -91,7 +91,7 @@ export async function updatePaymentStatus(
|
||||
const paymentInTransaction = await payload.findByID({
|
||||
collection: paymentsCollection,
|
||||
id: toPayloadId(paymentId),
|
||||
req: { transactionID: transactionID }
|
||||
req: { transactionID }
|
||||
}) as Payment
|
||||
|
||||
// Check if version still matches
|
||||
@@ -115,7 +115,7 @@ export async function updatePaymentStatus(
|
||||
},
|
||||
version: currentVersion + 1
|
||||
},
|
||||
req: { transactionID: transactionID }
|
||||
req: { transactionID }
|
||||
})
|
||||
|
||||
await payload.db.commitTransaction(transactionID)
|
||||
@@ -139,7 +139,7 @@ export async function updateInvoiceOnPaymentSuccess(
|
||||
payment: Payment,
|
||||
pluginConfig: BillingPluginConfig
|
||||
): Promise<void> {
|
||||
if (!payment.invoice) return
|
||||
if (!payment.invoice) {return}
|
||||
|
||||
const invoicesCollection = extractSlug(pluginConfig.collections?.invoices || defaults.invoicesCollection)
|
||||
const invoiceId = typeof payment.invoice === 'object'
|
||||
@@ -206,7 +206,7 @@ export function logWebhookEvent(
|
||||
export function validateProductionUrl(url: string | undefined, urlType: string): void {
|
||||
const isProduction = process.env.NODE_ENV === 'production'
|
||||
|
||||
if (!isProduction) return
|
||||
if (!isProduction) {return}
|
||||
|
||||
if (!url) {
|
||||
throw new Error(`${urlType} URL is required for production`)
|
||||
|
||||
Reference in New Issue
Block a user