Skip to content

Instantly share code, notes, and snippets.

View farzd's full-sized avatar
🌍
Available for hire

Farzad Qasim farzd

🌍
Available for hire
View GitHub Profile
@farzd
farzd / RevenueCatWebHookSupabaseEdgeFn.js
Last active February 2, 2025 08:15
Revenue Cat supabase hook
import "jsr:@supabase/functions-js/edge-runtime.d.ts";
import { createClient } from "jsr:@supabase/supabase-js@2";
import { create, verify } from "https://deno.land/x/[email protected]/mod.ts";
const supabase = createClient(
Deno.env.get("SUPABASE_URL")!,
Deno.env.get("SUPABASE_SERVICE_ROLE_KEY")!
);
const REVENUECAT_SECRET = Deno.env.get("RC_SECRET")!;

Adding prettier to a CRA project

Previously, I've had some problem to reliaby configure code formatting with Prettier in VSCode, in the context of a create-react-app proejct. Today, it worked like a charm, and this is what I did.

Preconditions:

  • react-scripts: "3.1.1"
  • react: "^16.9.0"
  • react-dom: "^16.9.0"
  • Dirk Baeumer's ESLint VSCode extension installed and running