1.1 KiB
1.1 KiB
Contributing to zapwall4science
Principles
- No fallbacks or silent failures.
- No analytics; no tests added unless explicitly requested.
- Respect lint, type-check, accessibility and exactOptionalPropertyTypes.
- No
ts-ignore, no untypedany, no console logs if a logger exists.
Setup
- Node 18+, npm
npm installnpm run lintnpm run type-check
Coding guidelines
- Split large components/functions to stay within lint limits (max-lines, max-lines-per-function).
- Prefer typed helpers/hooks; avoid duplication.
- Errors must surface with clear messages; do not swallow exceptions.
- Storage: IndexedDB encrypted (AES-GCM) via
lib/storage/cryptoHelpers.ts; use provided helpers. - Nostr: use
lib/articleMutations.tsandlib/nostr*.tshelpers; no direct fallbacks.
Workflow
- Branch from main; keep commits focused.
- Run lint + type-check before PR.
- Document fixes in
fixKnowledge/and features infeatures/.
Accessibility
- Respect ARIA, keyboard, contrast requirements; no regressions.
What not to do
- No analytics, no ad-hoc tests, no environment overrides, no silent retry/fallback.