- Build:
yarn build - Run:
yarn start(oryarn start:devto skip the increased Node heap size) - Format code:
yarn format - Run all unit tests:
yarn test - TypeScript check:
yarn ts - Run linter:
yarn lint:dev(disables a fewreact-hooksandreact/jsx-no-bindrules that are noisy during local development; CI runs the stricteryarn lint)
- Core: React, TypeScript
- State and data: Redux Toolkit, RTK Query
- Routing: React Router
- UI: MUI
- Build: Rsbuild
- Key libraries: Axios, Luxon, Slate, Chart.js, Mapbox, Turf.js, PlayCanvas, Mux
- Testing: Rstest, Playwright
- Development: Storybook
See package.json for the latest list of dependencies and versions.
- Use Redux Toolkit for application state and RTK Query for API requests
- Prefer using existing components from
@terraware/web-components - Use MUI components for UI only when no suitable
@terraware/web-componentsoption exists - Prefer existing utilities and helpers instead of introducing new ones
- Use the
component-test-agentfor tests that render a component, and theplaywright-test-agentfor end-to-end specs and tests of non-rendering code
- New state management, routing, or styling libraries
- Large dependencies when an existing solution already exists
- New React components should live near the feature that uses them
- Shared components should go in existing shared component directories
- Shared utilities should go in existing utility/helper directories
- Prefer modifying existing files rather than introducing new abstractions unless necessary
- Avoid creating new top-level directories unless necessary
- Follow the conventions defined in
.prettierrc - Avoid comments that restate what the code already expresses
- Prefer
const-assigned arrow functions over function declarations
- Install dependencies using
yarninstead ofnpm - After completing changes:
- Run
yarn format - Run
yarn ts - Run
yarn lint:dev
- Run
- Tests do not need to be rerun after formatting
- Add new strings to
src/strings/csv/en.csvat the bottom of the file - After adding new strings:
- Run
yarn alphabetize-strings - Run
yarn translate
- Run