import type { NextApiRequest, NextApiResponse } from 'next';
import crypto from 'crypto';
import getRawBody from 'raw-body';
The linter wants crypto to be node:crypto; but it's not clear if node:crypto is available on edge and middleware runtimes. It's unclear if the rule should auto fix, or if this is an exception and a doc issue.
Ref: https://vercel.com/docs/observability/webhooks-overview/webhooks-api#securing-webhooks Rule: https://github.com/vercel/style-guide/blob/canary/eslint/rules/unicorn.js#L20
Snippet:
The linter wants
crypto
to benode:crypto
; but it's not clear ifnode:crypto
is available on edge and middleware runtimes. It's unclear if the rule should auto fix, or if this is an exception and a doc issue.