- Use Yarn v1 instead of npm for all package management and script execution
yarn install- Install dependenciesyarn add <package>- Add new dependencyyarn add -D <package>- Add dev dependency
yarn lint- Run ESLint on entire codebaseyarn fix- Auto-fix linting issues and deduplicate yarnyarn test- Run Jest tests (single run)yarn watch- Run Jest tests in watch modeyarn test --testNamePattern="test name"- Run specific test by nameyarn verify- Run lint, typechain, tsc, and test (full verification)yarn precommit- Full pre-commit check (localize, lint-staged, tsc, test)tsc- TypeScript type checking (via package.json script)
- Formatting: Prettier with single quotes, no semicolons, no trailing commas, 80 char width
- Imports: Use
simple-import-sortplugin for automatic import sorting - Types: TypeScript required, no
allowJs, prefer explicit types overany - React: Use functional components with hooks, prefer
useHandleroveruseCallback - Naming: camelCase for variables/functions, PascalCase for components/types
- Files:
.tsxfor React components,.tsfor utilities/hooks - Error Handling: Use proper error boundaries, avoid throwing in render
- Text Components: Use
EdgeText,Paragraph,SmallText,WarningTextinstead of raw text - Hooks: Custom hooks in
src/hooks/, followuse*naming convention - Testing: Jest with React Native Testing Library, tests in
__tests__/directories
- Subject: Imperative mood, capitalize first letter, max 50 chars, no period
- Body: Explain what/why (not how), wrap at 72 chars, separate from subject with blank line
- Clean commits: Each commit should be standalone, build successfully, and improve code
- Rebasing: Use interactive rebase to split, squash, and reorder commits before PR
- Future commits: Use "future! branch-name" for feature dependencies not yet merged
- Draft PRs: Mark PRs with future commits as draft until dependencies are merged
- Fixup commits: Use
git commit --fixup <hash>for PR feedback, then squash withgit rebase -i --autosquash
- Create pseudo-merge commits with "future! branch-name" for dependent features
- Use
git rebase --ontoto update dependent branches when base changes - Remove future commits by rebasing onto master once dependencies are merged