Contributing to React Scan
May 1, 2026 · View on GitHub
Thanks for your interest in contributing to React Scan! This document covers the project layout, dev setup, and the workflow for getting your change merged.
Project Structure
This is a pnpm 10 monorepo orchestrated by turbo and built on Vite+ (oxlint, oxfmt, tsdown).
packages/
├── scan/ # Core React Scan library + CLI
├── extension/ # Browser extension (Chrome / Firefox / Brave)
├── vite-plugin-react-scan/ # Vite plugin wrapper
└── website/ # Marketing site (Next.js, react-scan.com)
kitchen-sink/ # Playwright target app (Vite, port 5173)
e2e/ # Playwright specs
docs/installation/ # Per-framework install guides
Development Setup
Prerequisites
- Node.js >= 22
- pnpm >= 10
Setup
git clone https://github.com/aidenybai/react-scan.git
cd react-scan
pnpm install
pnpm build
Dev workflow
pnpm dev # watches react-scan + kitchen-sink in parallel
pnpm --filter react-scan build:copy # build and copy IIFE to clipboard for ad-hoc testing
pnpm --filter @react-scan/extension dev # extension in Chrome
pnpm --filter @react-scan/website dev # marketing site
Code Style
We use Vite+ which bundles oxlint and oxfmt. See AGENTS.md for the full rule set.
pnpm lint # check
pnpm lint:fix # auto-fix
pnpm format # write
pnpm format:check # verify
pnpm check # lint + format:check + typecheck
pnpm typecheck
Highlights:
- TypeScript everywhere; avoid
any. - Interfaces over types; kebab-case filenames.
- Arrow functions over function declarations.
- No comments unless the "why" is non-obvious. Hacks must be prefixed with
// HACK: …. - Magic numbers in
constants.tswith_MS/_PXunit suffixes. - One utility per file under
utils/.
Tests
pnpm test # vitest in each package
pnpm test:e2e # Playwright against kitchen-sink (auto-started on :5173)
pnpm test:e2e:ui # Playwright UI mode
Pull Requests
- Fork and create a branch (
git checkout -b feat/your-feature). - Make your changes; run
pnpm checkandpnpm test:e2ebefore pushing. - If your change affects a published package, add a changeset:
pnpm changeset - Open a PR against
main. Tag @aidenybai for review.
Commit Convention
We use conventional commits:
feat:New featuresfix:Bug fixesdocs:Documentationchore:Maintenancerefactor:Code changes that neither fix bugs nor add featurestest:Tests
Example: fix(scan): handle null fiber in flash overlay
Getting Help
Happy contributing!