style-guide
style-guide copied to clipboard
Vercel Docs Violate Lint Rule (Webhooks)
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:
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.