Thank you for contributing! This guide will help you set up the project environment.
-
Clone the repository
git clone https://github.com/Co-App-Team/frontend.git
-
Open the project
- Open the project in your IDE of choice.
-
Install node.js
- You can install it from nodejs.org.
- Or use
node --versionto verify if it is already installed
-
Install depedencies
- Run
npm installin the directory containing the repository
- Run
-
You're ready to go!
- You can now run the project using
npm run dev
- You can now run the project using
Ensure to follow the structure as described in ARCHITECTURE.md.
Each commit should follow the structure below:
Header # A concise summary, no more than 50 characters
Body # Optional. Wrap lines at 72 characters- Create a branch by following the convention:
task/<issue_number>-<IndicatorOfTheTask>. - Merge to
developwhen the task development is completed. developis only merged tomainon the release day.
Important
All task branches need to be merged to develop. Please avoid merging task branches directly to main.
This project is configured to have code formatting using Prettier and linting using eslint.
For convenience we have installed a Husky pre-commit hook which if you have run npm i will run eslint and Prettier automatically on each commit.
Formatting/linting can be triggered manually using npm run lint or npx prettier and npx eslint.
All pull requests will have eslint and Prettier ran using the CI pipeline and must pass both before they can be merged.
The majority of rules configured for eslint and Prettier are the default configuration, eslint is using:
- js.configs.recommended
- reactHooks.configs.flat.recommended,
- reactRefresh.configs.vite,
and Prettier is set up with some rules like:
- Forcing
;at the end of lines - Using 2 spaces for tabWidth
- Forcing trailing commas
The full configuration can be found in eslint.config.js and .prettierrc.