The goal of this project is to provide a React with TypeScript starter application, which comes pre-configured with the USWDS-based Comet Component Library as well as other tools to accelerate development. Some of these tools are as follows:
- Tooling: Vite
- Platform: React with TypeScript
- Component Library: Comet Component Library
- Data Visualization: Victory Charts
- State Management: TanStack Query & Recoil
- Forms: React Hook Form
- Unit Testing: Jest with React Testing Library
- Code Analysis: ES Lint
- Code Formatting: Prettier
- End-to-End (E2E) Testing: Cypress
- Accessibility Testing: cypress-axe
- API support: axios
- Authentication support (coming soon): TBD
- Running the Project Locally
- Running Unit Tests
- Running Code Quality Checks
- Running End-to-End (E2E) Tests
- Contributing
- To install dependencies, run the following:
npm install
- To start the app, run the following:
npm run dev
To make sure your changes do not break any unit tests, run the following:
npm run test
Ensure to review the coverage directory for code coverage details.
npm run coverage
To make sure your changes adhere to additional code quality standards, run the following:
npm run lint
npm run format
You can also see the .vscode/settings.json
file to find how to enable auto-formatting on save.
Note: running E2E tests requires the app to be running as well, run the following:
npm run e2e
- Fork the Project
- Create your Feature Branch (
git checkout -b feature_a
) - Commit your Changes (
git commit -m 'Added new feature_a'
) - Push to the Branch (
git push origin feature_a
) - Open a Pull Request
Use EnvironmentPlugin
to expose specific values in from your .env
files through process.env
instead of the vite provided import.meta.env
way.
You would want to use EnvironmentPlugin
when you're creating unit test for code that tries to read a value through import.meta.env
.