Skip to content

Commit a35979f

Browse files
authored
fix(plugin-stripe): properly types async webhooks (#7317)
1 parent 863abc0 commit a35979f

File tree

3 files changed

+1
-5
lines changed

3 files changed

+1
-5
lines changed

packages/eslint-config/index.mjs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,6 @@ const typescriptRules = {
7070
'@typescript-eslint/no-unsafe-argument': 'off',
7171
'@typescript-eslint/no-unsafe-return': 'off',
7272
'@typescript-eslint/unbound-method': 'warn',
73-
// This rule doesn't work well in .tsx files
74-
'@typescript-eslint/no-misused-promises': 'off',
7573
'@typescript-eslint/consistent-type-imports': 'warn',
7674
'@typescript-eslint/no-explicit-any': 'warn',
7775
// Type-aware any rules end

packages/plugin-stripe/src/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export type StripeWebhookHandler<T = any> = (args: {
88
pluginConfig?: StripePluginConfig
99
req: PayloadRequest
1010
stripe: Stripe
11-
}) => void
11+
}) => Promise<void> | void
1212

1313
export type StripeWebhookHandlers = {
1414
[webhookName: string]: StripeWebhookHandler

test/plugin-stripe/webhooks/syncPriceJSON.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ export const syncPriceJSON = async (args) => {
99

1010
const { id: eventID, default_price } = event.data.object
1111

12-
console.log(event.data.object)
13-
1412
let payloadProductID
1513

1614
// First lookup the product in Payload

0 commit comments

Comments
 (0)