style-guide icon indicating copy to clipboard operation
style-guide copied to clipboard

Vercel Docs Violate Lint Rule (Webhooks)

Open dannyrb opened this issue 10 months ago • 0 comments

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.

dannyrb avatar Apr 08 '24 22:04 dannyrb